AutoHotkey Community

It is currently May 27th, 2012, 4:10 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 164 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 11  Next
Author Message
 Post subject:
PostPosted: July 21st, 2005, 6:20 pm 
Offline

Joined: June 11th, 2005, 9:34 am
Posts: 264
Location: England ish
::Cry:: it doesnt work some why?

the ,./ work they change into zxc but alll others dont??

whyyyy??

_________________
::
I Have Spoken
::


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2005, 11:54 pm 
I had the same problem. Here's something that seems to work for me, so maybe it'll work for you as well. It's a hackish and pointless solution to a problem I don't understand, but here it is in case it helps anyone.

Code:
; Many thanks to Chris for helping me out with this script.
; This script has been edited by an inexperienced scripter and only putatively seems to work fine.
; Code efficiency is not guaranteed.

mirror_1 = 0
mirror_2 = 9
mirror_3 = 8
mirror_4 = 7
mirror_5 = 6
mirror_q = p
mirror_w = o
mirror_e = i
mirror_r = u
mirror_t = y
mirror_a = '; 
mirror_s = l
mirror_d = k
mirror_f = j
mirror_g = h
mirror_z = /
mirror_x = .
mirror_c = ,
mirror_v = m
mirror_b = n
mirror_6 = 5
mirror_7 = 4
mirror_8 = 3
mirror_9 = 2
mirror_0 = 1
mirror_y = t
mirror_u = r
mirror_i = e
mirror_o = w
mirror_p = q
mirror_h = g
mirror_j = f
mirror_k = d
mirror_l = s
mirror_n = b
mirror_m = v
return


; This key may help, as the space-on-up may get annoying, especially if you type fast.
Control & Space::Suspend

; These keys are optional, but they may help if you are typing on the left-hand side.
CapsLock::Send, {BackSpace}
Space & CapsLock::Send, {Enter}

; If spacebar didn't modify anything, send a real space keystroke upon release.
space::
Send {space}
return

space & 1::
space & 2::
space & 3::
space & 4::
space & 5::
space & q::
space & w::
space & e::
space & r::
space & t::
space & a::
space & s::
space & d::
space & f::
space & g::
space & z::
space & x::
space & c::
space & v::
space & b::
space & `;::
space & ,::
space & .::
space & /::
space & 6::
space & 7::
space & 8::
space & 9::
space & 0::
space & y::
space & u::
space & i::
space & o::
space & p::
space & h::
space & j::
space & k::
space & l::
space & n::
space & m::
space & Tab::

; Determine the mirror key, if there is one:
if A_ThisHotkey = space & `;
   MirrorKey = a
else if A_ThisHotkey = space & ,
   MirrorKey = c
else if A_ThisHotkey = space & .
   MirrorKey = x
else if A_ThisHotkey = space & /
   MirrorKey = z
else if A_ThisHotkey = space & m
   MirrorKey = v
else if A_ThisHotkey = space & n
   MirrorKey = b
else if A_ThisHotkey = space & b
   MirrorKey = n
else if A_ThisHotkey = space & v
   MirrorKey = m
else if A_ThisHotkey = space & c
   MirrorKey = ,
else if A_ThisHotkey = space & x
   MirrorKey = .
else if A_ThisHotkey = space & z
   MirrorKey = /
else if A_ThisHotkey = space & l
   MirrorKey = s
else if A_ThisHotkey = space & k
   MirrorKey = d
else if A_ThisHotkey = space & j
   MirrorKey = f
else if A_ThisHotkey = space & h
   MirrorKey = g
else if A_ThisHotkey = space & g
   MirrorKey = h
else if A_ThisHotkey = space & f
   MirrorKey = j
else if A_ThisHotkey = space & d
   MirrorKey = k
else if A_ThisHotkey = space & s
   MirrorKey = l
else if A_ThisHotkey = space & a
   MirrorKey = '
else if A_ThisHotkey = space & p
   MirrorKey = q
else if A_ThisHotkey = space & o
   MirrorKey = w
else if A_ThisHotkey = space & i
   MirrorKey = e
else if A_ThisHotkey = space & u
   MirrorKey = r
else if A_ThisHotkey = space & y
   MirrorKey = t
else if A_ThisHotkey = space & t
   MirrorKey = y
else if A_ThisHotkey = space & r
   MirrorKey = u
else if A_ThisHotkey = space & e
   MirrorKey = i
else if A_ThisHotkey = space & w
   MirrorKey = o
else if A_ThisHotkey = space & q
   MirrorKey = p
else if A_ThisHotkey = space & Tab
   MirrorKey = Backspace

else  ; To avoid runtime errors due to invalid var names, do this part last.
{
   StringRight, ThisKey, A_ThisHotkey, 1
   StringTrimRight, MirrorKey, mirror_%ThisKey%, 0  ; Retrieve "array" element.
   if MirrorKey =  ; No mirror, script probably needs adjustment.
      return
}

Modifiers =
GetKeyState, state1, LWin
GetKeyState, state2, RWin
state = %state1%%state2%
if state <> UU  ; At least one Windows key is down.
   Modifiers = %Modifiers%#
GetKeyState, state1, Control
if state1 = D
   Modifiers = %Modifiers%^
GetKeyState, state1, Alt
if state1 = D
   Modifiers = %Modifiers%!
GetKeyState, state1, Shift
if state1 = D
   Modifiers = %Modifiers%+
Send %Modifiers%{%MirrorKey%}
return



Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2005, 2:26 am 
And... I forgot the numbers, sorry. If you want them, these should be added where similar lines are:

Code:
else if A_ThisHotkey = space & 1
   MirrorKey = 0
else if A_ThisHotkey = space & 2
   MirrorKey = 9
else if A_ThisHotkey = space & 3
   MirrorKey = 8
else if A_ThisHotkey = space & 4
   MirrorKey = 7
else if A_ThisHotkey = space & 5
   MirrorKey = 6
else if A_ThisHotkey = space & 6
   MirrorKey = 5
else if A_ThisHotkey = space & 7
   MirrorKey = 4
else if A_ThisHotkey = space & 8
   MirrorKey = 3
else if A_ThisHotkey = space & 9
   MirrorKey = 2
else if A_ThisHotkey = space & 0
   MirrorKey = 1


Report this post
Top
  
Reply with quote  
 Post subject: Modified script
PostPosted: January 14th, 2006, 2:00 am 
Offline

Joined: July 20th, 2005, 10:59 pm
Posts: 6
Location: Kaneohe & Honolulu, HI
I adapted this script to use the "Scroll Lock" key as the modifier (instead of the spacebar, so it wouldn't affect my normal typing speed). I mapped my mouse's "back" thumb button to "Scroll Lock", and added some code to the script to make it application sensitive (the thumb by itself gives me an Esc in AutoCAD, or my mouse's default "browser back" in IE - I'd gotten used to using the "back" and "forward" buttons while browsing).

FYI, I use a Logitech Mx500

Below is my script - you can modify it to suit your needs (for example, I type "6" with my left index finger instead of the "standard" right index, so I use 5 & 6 for symbols). I'm also not finished mapping T, Y, & Tab to [, ], and \ (I stretch my left index to Y when using one hand).

Install AutoHotkey, map your mouse's thumb button to "Scroll Lock", and run the script. If you like it, add the script to your Startup items so it will always be running when you log in.

Code:
; This version by Lionel J. Camara
; Last updated: 9/8/05
;
; Assigned mouse's thumb button (Logitech Mx500) to Scroll Lock.
; Thumb button is an Esc in AutoCAD or Browser Back in most else.
; Thumb button is also the modifier access the right-side keys.
;
; Note: currently only flips one way (use left hand on keyboard)
;
; Sometimes the ScrollLock gets "stuck" on when locking/unlocking the workstation.
; To fix: Ctrl-ScrollLock toggles


; Many thanks to Chris for helping me out with this script.

SetStoreCapslockMode Off  ; Allows Capslock to be ON to send remapped keys in uppercase.

; number row (change)
mirror_1 = 0
mirror_2 = 9
mirror_3 = 8
mirror_4 = 7
;mirror_5 = 6
mirror_5 = -
;mirror_6 = = ;is there a way to do this? I tried '= and {=}

; top row
mirror_q = p
mirror_w = o
mirror_e = i
mirror_r = u
;mirror_t = y
; need others

; home row
mirror_a = `;
mirror_s = l
mirror_d = k
mirror_f = j
mirror_g = h
; need others

; bottom row
mirror_z = /
mirror_x = .
mirror_c = ,
mirror_v = m
mirror_b = n


; right-hand side - for completeness (no need)
;mirror_6 = 5
;mirror_7 = 4
;mirror_8 = 3
;mirror_9 = 2
;mirror_0 = 1
;mirror_y = t
;mirror_u = r
;mirror_i = e
;mirror_o = w
;mirror_p = q
;mirror_h = g
;mirror_j = f
;mirror_k = d
;mirror_l = s
;mirror_n = b
;mirror_m = v
return



; This key may help, as the space-on-up may get annoying, especially if you type fast.
;Control & NumpadLeft::Suspend

; These keys are optional, but they may help if you are typing on the left-hand side.
;CapsLock::Send, {BackSpace}
;Space & CapsLock::Send, {Enter}

; If spacebar didn't modify anything, send a real space keystroke upon release.
;NumpadLeft::
;Send {NumpadLeft}
;return


; For if you forget modifier (and makes quicker/easier to use):
Shift & CapsLock::Send, {"}


ScrollLock & `::Send, {BackSpace}


;ScrollLock & CapsLock::Send, {'} ;DOESN'T HANDLE " (WITH SHIFT)
;THIS HANDLES SHIFT (AND OTHER MODIFIERS):
ScrollLock & CapsLock::
MirrorKey = '
Modifiers =
GetKeyState, state1, LWin
GetKeyState, state2, RWin
state = %state1%%state2%
if state <> UU  ; At least one Windows key is down.
   Modifiers = %Modifiers%#
GetKeyState, state1, Control
if state1 = D
   Modifiers = %Modifiers%^
GetKeyState, state1, Alt
if state1 = D
   Modifiers = %Modifiers%!
GetKeyState, state1, Shift
if state1 = D
   Modifiers = %Modifiers%+
Send %Modifiers%{%MirrorKey%}
return


;Couln't figure out how to set a varable to the "=" key, so use this instead:
ScrollLock & 6::
Modifiers =
GetKeyState, state1, LWin
GetKeyState, state2, RWin
state = %state1%%state2%
if state <> UU  ; At least one Windows key is down.
   Modifiers = %Modifiers%#
GetKeyState, state1, Control
if state1 = D
   Modifiers = %Modifiers%^
GetKeyState, state1, Alt
if state1 = D
   Modifiers = %Modifiers%!
GetKeyState, state1, Shift
if state1 = D
   Modifiers = %Modifiers%+
Send %Modifiers%{=}
return


;ScrollLock::
;IfWinNotActive, AutoCAD
;{
;Send, !{NumpadLeft}
;   return
;}
;Send, {esc}
;   return


ScrollLock::
IfWinActive, AutoCAD
{
Send, {esc}
   return
}
IfWinActive, Microsoft Excel
{
Send, {esc}
   return
}
IfWinActive, Save Drawing As
{
Send, !2
   return
}
IfWinActive, Save a file
{
Send, {backspace}
   return
}
Send, !{NumpadLeft}
   return




; number row
ScrollLock & 1::
ScrollLock & 2::
ScrollLock & 3::
ScrollLock & 4::
ScrollLock & 5::

; top row
ScrollLock & q::
ScrollLock & w::
ScrollLock & e::
ScrollLock & r::
;ScrollLock & t::

; home row
;ScrollLock & CapsLock::
ScrollLock & a::
ScrollLock & s::
ScrollLock & d::
ScrollLock & f::
ScrollLock & g::

; bottom row
ScrollLock & z::
ScrollLock & x::
ScrollLock & c::
ScrollLock & v::
ScrollLock & b::

; right side
;ScrollLock & `;::
;ScrollLock & ,::
;ScrollLock & .::
;ScrollLock & /::
;ScrollLock & 6::
;ScrollLock & 7::
;ScrollLock & 8::
;ScrollLock & 9::
;ScrollLock & 0::
;ScrollLock & y::
;ScrollLock & u::
;ScrollLock & i::
;ScrollLock & o::
;ScrollLock & p::
;ScrollLock & h::
;ScrollLock & j::
;ScrollLock & k::
;ScrollLock & l::
;ScrollLock & n::
;ScrollLock & m::
; Determine the mirror key, if there is one:
;if A_ThisHotkey = space & `;
;   MirrorKey = a
;else if A_ThisHotkey = space & ,
;   MirrorKey = c
;else if A_ThisHotkey = space & .
;   MirrorKey = x
;else if A_ThisHotkey = space & /
;   MirrorKey = z
;if A_ThisHotkey = space & CapsLock
;   MirrorKey = '
;else  ; To avoid runtime errors due to invalid var names, do this part last.
{
   StringRight, ThisKey, A_ThisHotkey, 1
   StringTrimRight, MirrorKey, mirror_%ThisKey%, 0  ; Retrieve "array" element.
   if MirrorKey =  ; No mirror, script probably needs adjustment.
      return
}

Modifiers =
GetKeyState, state1, LWin
GetKeyState, state2, RWin
state = %state1%%state2%
if state <> UU  ; At least one Windows key is down.
   Modifiers = %Modifiers%#
GetKeyState, state1, Control
if state1 = D
   Modifiers = %Modifiers%^
GetKeyState, state1, Alt
if state1 = D
   Modifiers = %Modifiers%!
GetKeyState, state1, Shift
if state1 = D
   Modifiers = %Modifiers%+
Send %Modifiers%{%MirrorKey%}
return

_________________
Lionel Camara
KAI Hawaii, Inc. (Structural & Forensic Engineers)
Programmer, IT Guy, & Detailer


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 30th, 2006, 3:17 am 
Thank you for these scripts - finding myself suddenly one-hand-abled, I'm finding the half-QWERTY method really great.

Only one problem - on my laptop (a Fujitsu LifeBook running XP), the shift key doesn't work with any of the versions of this script, i.e. it won't capitalize a letter. Oddly, it will work if I hold down the space bar. Any ideas? Script works fine on my other computer.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2006, 10:48 pm 
Offline

Joined: July 28th, 2006, 12:36 pm
Posts: 5
Would anyone be willing to combine this script with the OnScreenKeyboard script, so that pressing the spacebar would change the letters on the keyboard?

That would be great...

_________________
Richard


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 2nd, 2006, 4:27 pm 
Offline

Joined: May 25th, 2006, 7:25 pm
Posts: 11
Location: Toronto
Here's my solution...
Code:
; Left Hand Keyboard for Touch Typists.
; Date: 02-08-2006
; To make Shift/Ctrl/Alt keys "sticky" Thanks Titan!
Loop, % 255 - 165
   end := end . ",{" . Chr(A_Index + 32) . "}"

Shift::
Input, key, B L1 *, %end%
StringReplace, key, ErrorLevel, EndKey:
Send {Shift Down}{%key%}{Shift Up}
Return

Ctrl::
Input, key, B L1 *, %end%
StringReplace, key, ErrorLevel, EndKey:
Send {Ctrl Down}{%key%}{Ctrl Up}
Return

Alt::
Input, key, B L1 *, %end%
StringReplace, key, ErrorLevel, EndKey:
Send {Alt Down}{%key%}{Alt Up}
Return

; Without this capslock would shift only letters.
+CapsLock::   ; Must catch capslock and Shift capslock to make this work.

CapsLock::
  if CapsState = D
  {
    CapsState = U
    Send {LShift Up}
  }
  else
  {
    CapsState = D
    Send {LShift Down}
  }
  return

;Consider the following example, which makes Space into a prefix key.
Space & q::Send,{p}
Space & w::Send,{o}
Space & e::Send,{i}
Space & r::Send,{u}
Space & t::Send,{y}

Space & a::Send,{:}
Space & s::Send,{l}
Space & d::Send,{k}
Space & f::Send,{j}
Space & g::Send,{h}

Space & z::Send,{?}
Space & x::Send,{.}
Space & c::Send,{,}
Space & v::Send,{m}
Space & b::Send,{n}

Space & `::send,{-}
Space & 1::Send,{0}
Space & 2::Send,{9}
Space & 3::Send,{8}
Space & 4::Send,{7}
Space & 5::Send,{6}

Space & Tab::Send,{BS}
Space & CapsLock::Send,{Enter}

;To make the Space bar send a real "Space" keystroke whenever it isn't used to launch a hotkey.
$Space::
Send, {Space down}
Sleep 250
Send {Space up}
Return

;The $ prefix is needed to prevent a warning dialog about an infinite loop (since the hotkey
;"sends itself").In addition, the above action occurs at the time the key is released.



I still haven't worked out how to get Space NOT to be sent if it is held down for awhile as when you are deciding if you want to send the "half-qwerty" key.
Mike


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Half-QWERTY
PostPosted: January 5th, 2007, 7:24 pm 
Offline

Joined: May 25th, 2006, 7:25 pm
Posts: 11
Location: Toronto
It was written for people who only have use of one hand that were touch typists before their accident or illness.
But yes, some have used foot switches,etc. insteadof the Space bar.

Many contributed to the code - thanks to you all - and there are other approaches taken if you look through the forum.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2007, 5:32 am 
I'm very interested by this script... except now that you've written it, I don't know what to do with it. How do I take that text and turn it into a working program?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2007, 3:44 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
You might find these pages useful:

Quick-start Tutorial
Help on Scripts
Frequently Asked Questions


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2007, 10:06 pm 
thanks- it helped! :lol:


Report this post
Top
  
Reply with quote  
 Post subject: Cheers
PostPosted: April 2nd, 2007, 5:00 pm 
Just wanted to say thanks to everyone who contributed for providing a free solution for one handed typing. I've been looking for something like this for a while.

Now I need to research something similar for my Mac and Linux machines! Heh.

(Typed very slowly with one hand...)


Report this post
Top
  
Reply with quote  
 Post subject: thanks beyond measure
PostPosted: April 19th, 2007, 3:25 pm 
hello everyone who contributed to this script

thank you so very much for this script, i've been looking for this for over two
years!

due to the monopolizing M. company i nearly lost my hope, i searched everywhere but couldnt find anything until late last night i stumbled upon autohotkey. i am so happy!

thanks!


Report this post
Top
  
Reply with quote  
PostPosted: May 4th, 2007, 12:54 am 
Hello.

I was searching for something like this. But i dislike the concept of switching the letters using a modifier key. I'd like a program or script in wich i could load dictionaries (i would add English and Spanish); a program that was also able to learn, so i could just type and the program "guessed" what i mean. I think it wouldn't be difficult, but i have no idea of programming.

I think it would be very precise. I mean, something like what the cellphones use to write messages. They guess pretty well when there are 3 or 4 letters per button. In a half-querty system there would be only 2, so it would be much more precise. In English there would be very few mistakes, and in Spanish almost none (we have larger words).

Does anyone know if something like this is available?
cesa.facundo@gmail.com


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2007, 1:13 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8667
Location: Salem, MA
it seems feasible

1. make a script with words as hotstrings (parse a dictionary website to get the words?)
Code:
:*:word::word
:*:another::another


2. loop read the file and parse each line to turn it into (using the mirror list)
Code:
:*:wwrd::word
:*:abwtger::another


3. Run the parsed script

4. Profit!

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 164 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 11  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Stigg and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group