EDIT:
The latest version, 1.1.5, is here. Save as a .ahk file to use it.
I've been pondering for a while, what would be a systematic, easily configurable way for one-handed typing. This is what i've come up with, the 7KAT (7-key alternative typing) system.
If you output only alphanumeric keys and make no typo mistakes, then you will only be using 5 keys of the keyboard, to output all letters/numbers, as well as Shifting/space/return and the common punctuation of comma/period. But we all make typo errors, so the 6th key is used for Backspace. Additionally, the 7th key is used for symbols. The script will prompt you to choose 7 keys (which can be any alphanumeric or symbol key), and then dynamically sets up the hotkeys according to the keys selected, to accomplish the 26 letters, 10 numbers, punctuation/space/return/Esc/Backspace/symbols, and Shifting/CapsLock. Any keyboard key, outside the 7 keys, remains as normal usage, so this provides a great deal of flexibility. You can change the layout any time, and also toggle/Suspend the typing mode to restore normal keyboard use (even leaving the rest of your script's hotkeys intact in the case it contains this script). While there is still room for improvement, i believe this is the most systematic, efficient, and flexible method available for one-hand typing.
1 = thumb
a/ei/ou................1 + 2/3/4
bc/df/gh..............2 + 2/3/4
jk/lm/np..............3 + 2/3/4
q/r/s/t/v..............4 + 1/2/3//5
w/x/yz................5 + 2/3/4
backspace..........5b ; 6th key is used
Space.................1
Enter..................3 + 1
./Tab/,................5 + 1(x1/2/3)
CapsLock...........2 + 5
CapsNext...........2 + 1
numbers/Esc.......1 + 5(x1/hold)
0.........................1
1/2/3...................2(x1/2/3)
4/5/6...................3(x1/2/3)
7/8/9...................4(x1/2/3)
change layout......3 + 5
+-*/=\(){}[]........1+7 repeat as needed
!@#$%^&...........7+1 repeat as needed
;:"`_|?<>............5+7 repeat as needed
Code:
;-------------------------------------------------------
; 7-Key Alternative Typing System 1.1.2
; by Decarlo
hotkeySuspend = ^#s ; change to preference
; The next value affects how fast to press a key to output different letters.
; 100 - 400 is the optimal range; for faster typers, lower the number.
; You might need to tweak the Keyboard character repeat settings.
; The control panel Accessibility Options > FilterKeys also has related settings.
; Default is 300 for new users to more easily adapt.
; You can also hold the key pressed instead of pressing it more than once.
typingSpeedSetting = 300 ; millisec window range for output change
; Several keys can output more than one character.
; a/ei/ou 1 + 2/3/4 ; 1 = thumb.
; bc/df/gh 2 + 2/3/4
; jk/lm/np 3 + 2/3/4
; q/r/s/t/v 4 + 1/2/3/4/5
; w/x/yz 5 + 2/3/4
; backspace 5b ; 6th key is used
; Space/./, 5 + 1(x1/2/3)
; Enter 3 + 1
; Esc/numbers 1 + 5(x1/hold)
; 0 1
; 1/2/3 2(x1/2/3)
; 4/5/6 3(x1/2/3)
; 7/8/9 4(x1/2/3)
; change layout 3 + 5
AutoTrim, off
Suspend ; necessary for re-configuration upon reload
Msgbox,4096, 7-Key Alternative Typing 1.1.2,
(
After this msgbox, press and release, thumb being first,`n
each of the 5 main keys you wish to use, `n
and the 6th key which will be used for Backspace.`n
The 7th key is not yet implemented.
It will be for symbols and options.
)
SplashTextOn,,, select your keys
Input, 7keys, L6
StringMid, 7k_1, 7keys, 1, 1
if 7k_1 = %A_Space%
7k_1 = Space
StringMid, 7k_2, 7keys, 2, 1
StringMid, 7k_3, 7keys, 3, 1
StringMid, 7k_4, 7keys, 4, 1
StringMid, 7k_5, 7keys, 5, 1
StringMid, 7k_6, 7keys, 6, 1
; StringMid, 7k_7, 7keys, 7, 1 ; for symbols & other options, not yet implemented.
SplashTextOff
msgbox, 4097, 7-Key Alternative Typing,
(
keys selected:`n`n%7k_1%, %7k_2%, %7k_3%, %7k_4%, %7k_5%, %7k_6%`n
To change this, Cancel.`n`n`nSpace+F7 will show the Menu.`n`n
)
ifMsgbox, Cancel, RELOAD
Hotkey, %7k_3% & %7k_5%, 7K_Reload
Hotkey, %7k_5% & %7k_1%, 7K_space_period_comma
Hotkey, %7k_6%, 7K_backspace
Hotkey, %7k_3% & %7k_1%, 7K_Enter
Hotkey, %7k_1% & %7k_5%, 7K_Esc_Numbers
Hotkey, %7k_1%, 7K_0
Hotkey, %7k_1% & %7k_2%, 7K_a
Hotkey, %7k_1% & %7k_3%, 7K_e_i
Hotkey, %7k_1% & %7k_4%, 7K_o_u
Hotkey, %7k_2%, 7K_b_c_123
Hotkey, %7k_2% & %7k_3%, 7K_d_f
Hotkey, %7k_2% & %7k_4%, 7K_g_h
Hotkey, %7k_3% & %7k_2%, 7K_j_k
Hotkey, %7k_3%, 7K_l_m_456
Hotkey, %7k_3% & %7k_4%, 7K_n_p
Hotkey, %7k_4% & %7k_1%, 7K_q
Hotkey, %7k_4% & %7k_2%, 7K_r
Hotkey, %7k_4% & %7k_3%, 7K_s
Hotkey, %7k_4%, 7K_t_789
Hotkey, %7k_4% & %7k_5%, 7K_v
Hotkey, %7k_5% & %7k_2%, 7K_w
Hotkey, %7k_5% & %7k_3%, 7K_x
Hotkey, %7k_5% & %7k_4%, 7K_y_z
Hotkey, %hotkeySuspend%, 7K_Suspend
Suspend, off
SplashTextOn,700,70, script updated, `n7-Key Alternative Typing 1.1.2`nReady
Sleep, 300
SplashTextOff
Return
;-----------------------------------------------
7KAT(char1,char2,char3="")
{
global typingSpeedSetting
static 7KAT_index
if ( A_TimeSincePriorHotkey < typingSpeedSetting ) OR ( A_TimeSincePriorHotkey = -1 )
7KAT_index += 1
else
7KAT_index = 1
if 7KAT_index = 1
send %char1%
else if 7KAT_index = 2
send {backspace}%char2%
else if char3
send {backspace}%char3%
}
7K_Suspend:
suspend
return
7K_Reload:
RELOAD
7K_backspace:
if GetKeyState(7k_6, "p")
send {backspace}
return
7K_Enter:
send {Enter}
return
7K_space_period_comma:
7KAT("{Space}",".",",")
return
7K_Esc_Numbers:
Loop 15
{
sleep 20
if not GetKeyState(7k_5, "p")
{
send {Esc}
BREAK
}
if A_Index = 15
{
if 7K_numbers
{
SplashText("Numbers off", "300")
7K_numbers =
}
else
{
SplashText("Numbers on", "300")
7K_numbers = 1
}
}
}
return
7K_a:
send a
return
7K_e_i:
7KAT("e","i")
return
7K_o_u:
7KAT("o","u")
return
7K_0:
if 7K_numbers
send {ASC 48} ; number 0
return
7K_b_c_123:
if 7K_numbers
7KAT("{ASC 49}","{ASC 50}","{ASC 51}") ; numbers 1,2,3
else if ( A_TimeSincePriorHotkey > 300 ) OR ( A_TimeSincePriorHotkey = -1 )
send b
else
send {backspace}c
return
7K_d_f:
7KAT("d","f")
return
7K_g_h:
7KAT("g","h")
return
7K_j_k:
7KAT("j","k")
return
7K_l_m_456:
if 7K_numbers
7KAT("{ASC 52}","{ASC 53}","{ASC 54}") ; numbers 4,5,6
else if ( A_TimeSincePriorHotkey > 300 ) OR ( A_TimeSincePriorHotkey = -1 )
send l
else
send {backspace}m
return
7K_n_p:
if ( A_TimeSincePriorHotkey > 400 ) OR ( A_TimeSincePriorHotkey = -1 )
send n
else
send {backspace}{ASC 0112} ;letter p
return
7K_q:
send q
return
7K_r:
send r
return
7K_s:
send s
return
7K_t_789:
if 7K_numbers
7KAT("{ASC 55}","{ASC 56}","{ASC 57}") ; numbers 7,8,9
else if ( A_TimeSincePriorHotkey < 300 )
send t
return
7K_v:
send v
return
7K_w:
send w
return
7K_x:
send x
return
7K_y_z:
if ( A_TimeSincePriorHotkey > 300 ) OR ( A_TimeSincePriorHotkey = -1 )
send y
else
send {backspace}z
return
Space & F7::
Msgbox, 8192, 7-Key Alternative Typing 1.1.2,
(
(1 = thumb)
a/ei/ou 1 + 2/3/4
bc/df/gh 2 + 2/3/4
jk/lm/np 3 + 2/3/4
q/r/s/t/v 4 + 1/2/3/4/5
w/x/yz 5 + 2/3/4
backspace 5b ; 6th key is used
Space/./, 5 + 1(x1/2/3)
Enter 3 + 1
Esc/numbers 1 + 5(x1/hold)
0 1
1/2/3 2(x1/2/3)
4/5/6 3(x1/2/3)
7/8/9 4(x1/2/3)
suspend script %hotkeySuspend%
current layout:`t%7k_1%, %7k_2%, %7k_3%, %7k_4%, %7k_5%, %7k_6%
change layout 3 + 5
Use a layout which you are comfortable with,
and change it as needed to prevent hand stress.
Thanks for using the 7KAT system. -Decarlo L.
)
return
;------------------------------------
SplashText(title="", timeout="", width="", height="", text="") ; default timeout 700
{
SplashTextOn, %Width%, %Height%, %Title%, %Text%
if timeout =
sleep 700
else
sleep %timeout%
SplashTextOff
return
}
;------------------------------------