Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Half-QWERTY: One-handed Typing


  • Please log in to reply
175 replies to this topic
Mecdemort
  • Guests
  • Last active:
  • Joined: --
I've come up with my own variation that attempts to fix the spacebar lag by using tab to do a space instead. However I want to make 'space & tab' do tab but for some reason I can't get it to work.

I thought it should be something like:

Tab::Send {Space}
Space & Tab::Send {Tab}

But tab and space+tab just both send a space. Anyone have any thoughts on how to correct this? This is my full script:

mirror_1 = `=
mirror_2 = `-
mirror_3 = 0
mirror_4 = 9
mirror_5 = 8
mirror_6 = 7

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
return

CapsLock::Send, {Enter}
Space & CapsLock::Send,{BackSpace}

Tab::Send {Space}
Space & Tab::Send {Tab}

space & `::
space & 1::
space & 2::
space & 3::
space & 4::
space & 5::
space & 6::

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::

; Determine the mirror key, if there is one:
if A_ThisHotkey = space & ``
   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


Mecdemort
  • Guests
  • Last active:
  • Joined: --
The full script with working tab and space+tab:

mirror_1 = `=
mirror_2 = `-
mirror_3 = 0
mirror_4 = 9
mirror_5 = 8
mirror_6 = 7

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
return

CapsLock::Send, {Enter}
Space & CapsLock::Send,{BackSpace}

$Tab::Send {Space}
Space & Tab::Send {Tab}

space & `::
space & 1::
space & 2::
space & 3::
space & 4::
space & 5::
space & 6::

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::

; Determine the mirror key, if there is one:
if A_ThisHotkey = space & ``
   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


ChuckEgg
  • Guests
  • Last active:
  • Joined: --
Nice Job, guys.

I, too, have been looking for a software solution for my laptop ever since I saw the 'M' keyboard a few years ago. The scripts you've composed work great!

Here are a few of my observations:

1) I'm having some arthritis/ other issues with my left hand, so I'd like to try RIGHT-handed typing. So, I appreciate the scripts that mirror both the RIGHT and LEFT sides of the keyboard. Right-handed typing is more common to police officers and others who might have a need to type while their other hand is on the steering wheel.

2) For some time, I've been I use a great program called AsUType that automatically fixes spelling errors as you type. Many of your one-handed spelling errors magically disappear if you use AsUType while using the the one-handed typing script :) http://www.AsUType.com

3) 2) The SPACEBAR is a great modifier, because the typist's thumb is nearly always resting on it even while the hand rests on the home key position. However, the BACKSPACE key is inconvenient because the typist must generally move his hand from the home position to use the backspace key, which is out-of reach. The "AsUType" program allows the typist to quickly "double-tap" the caps lock key to undo a spelling correction (restore what the typist incorrectly typed). Similarly, I think "double tapping" the spacebar to backspace is much more intuitive than removing your hand from the home position to use the "real" backspace key.

I may try to modify this myself, but anyone else here who is more familiar with the script is welcome to make the change.

MateFARKAS
  • Members
  • 75 posts
  • Last active: Apr 01 2013 06:38 PM
  • Joined: 28 Oct 2007

so i invented a new layout, ENTI-Key++
<!-- w -->www.entikey.z11.de<!-- w -->
...
is it possible to create an autohotkey-script for that layout?

Yes, it is possible. See <!-- m -->http://www.autohotke...pic.php?t=28447<!-- m -->

  • Guests
  • Last active:
  • Joined: --
Good day all,

I attempted to use this script on my laptop (windows XP) but nothing happens. Can someone put some directions up so that I can figure out what I am doing wrong. I love the concept and have been looking for it for 10 years, but I am not a software guy & don't know what I am doing wrong.

Thank you, Mark

AAC
  • Members
  • 11 posts
  • Last active: Feb 05 2013 08:56 PM
  • Joined: 25 May 2006
Hi "Guest",

Are you getting the white " H " with the green background icon on the task bar when you run it?

Mike

  • Guests
  • Last active:
  • Joined: --
To tell you the truth, I had to replace my PC not long ago due to a failure and I have not attempted to reinstall because it did not work last time. I do not remember seeing any indication that I had installed or run anything after running the script.

I believe that you had to install an application, perhaps netdot or something like that for it to work. But again I never saw any indication that the script was active. That is why I was hoping that someone could post instructions on how to get up and running.

AAC
  • Members
  • 11 posts
  • Last active: Feb 05 2013 08:56 PM
  • Joined: 25 May 2006

To tell you the truth, I had to replace my PC not long ago due to a failure and I have not attempted to reinstall because it did not work last time. I do not remember seeing any indication that I had installed or run anything after running the script.

I believe that you had to install an application, perhaps netdot or something like that for it to work. But again I never saw any indication that the script was active. That is why I was hoping that someone could post instructions on how to get up and running.


Try this -left or right as you need. Cut and paste into "Notepad".
Don't forget to complile them.
Right click on the *.ahk file and left click on compile.
If this doesn't work let me know.
Mike

Left Handed Keyboard
; Left Hand Keyboard for Touch Typists.
; Date: 03-08-2006 
; Michael Seaman, ACWC, Bridgepoint Hospital

; To make Shift/Ctrl/Alt keys "sticky" Thanks Titan!
; Thanks to everyone else!

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.

Right Handed Keyboard
; RightHand Keyboard for Touch Typists.
; Date: 05-10-2006 Michael Seaman, Bridgepoint Hospital
; To make Shift/Ctrl/Alt keys "sticky" Thanks Titan!
; Thanks to everyone else as well!

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 {RShift Up}
  }
  else
  {
    CapsState = D
    Send {RShift Down}
  }
  return

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

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

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

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

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

;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.


  • Guests
  • Last active:
  • Joined: --
Thank you for the instructions. I saved the notepad file as "halfQWERTY.bat", but you lost me at
"Right click on the *.ahk file and left click on compile."

Is this part of an application that I need to download to support/run this script?

  • Guests
  • Last active:
  • Joined: --
Never mind. I have it. I had to review some of the other postings, but I found the AutoHotKey program and installed it. My earlier problems were that I did not compile the script.

Thank you for your help.

MoRoCo

AAC
  • Members
  • 11 posts
  • Last active: Feb 05 2013 08:56 PM
  • Joined: 25 May 2006
That's good. Feel free to ask any questions or suggest improvements.
Mike

max
  • Members
  • 1 posts
  • Last active: Sep 30 2008 12:50 AM
  • Joined: 29 Sep 2008
New to this thread and new to 1handed typing I can say that Markkus' version is the most complete. but thanks to all for all the collaboration.
mirrored here <!-- m -->http://warped.org/li...alfKeyboard.zip<!-- m --> just in case.


Also, since i'm using my left hand, I made this tweak to get ' and - nearby :
original := "``" . "12345qwertasdfgzxcvbh"   ; split up string for better
mirrored := "-"  . "09876poiuy;lkjh/.,mn'"   ; human readability

and added pageup/pagedown as ctrl5/6
; Define special key combos here (took them from RG's mod):
^1::Send {Home}
^2::Send {End}
^3::Send {Del}
^4::Send {PgUp}
^5::Send {PgDn}

-m

Here is a much more flexible version. I almost recoded everything in a more compact manner. I also solved the CapsLock-thingy where the CapsLock-LED doesn't light up and pressing SPACE while CapsLock is on, a space appears before the first character. Also I made it work with German, English and French keyboard layout. (Getting the keyboard locale from Registry is important, b/c if you have an English system with German keyboard, A_Locale will return 0409 (=English).

For my keyboard locale, all numeric keys return the shifted punctuation signs when CapsLock is on.

Download the whole stuff incl. nice TrayIcon and Help-Image here. The image is this:

Posted Image

And the icon.

Here comes the code:

#SingleInstance

; HalfKeyboard invented by Matias Corporation between 1992 and 1996
; Originally coded in AutoHotkey by jonny in 2004
; Many thanks to Chris for helping him out with this script.
; Capslock hacks and `~ remap to '" by Watcher
; This implementation was done by mbirth in 2007

Menu Tray, Icon, HalfKeyboard.ico
Menu Tray, Tip, HalfKeyboard emulator
Menu Tray, Add, E&xit, MenuExit
Menu Tray, NoStandard
FileInstall HK_dn.gif, HalfKeyboard_help.gif

RegRead KLang, HKEY_CURRENT_USER, Keyboard Layout\Preload, 1
StringRight KLang, KLang, 4
If (!KLang)
  KLang := A_Language

If (KLang = "0407") {
  ; 0407 DE_de QWERTZ mirror set
  original := "^12345qwertasdfgyxcvb"
  mirrored := "ß09876poiuzölkjh-.,mn"
} Else If (KLang = "040c" || KLang = "040C") {
  ; 040c FR_fr AZERTY mirror set         
  original := "²&é" . """" . "'(azertqsdfgwxcvb"   ; split up string for better
  mirrored := ")àç" . "_"  . "è-poiuymlkjh!:;,n"   ; human readability
} Else {
  ; 0409 US_us QWERTY mirror set
  original := "``" . "12345qwertasdfgzxcvb"   ; split up string for better
  mirrored := "'"  . "09876poiuy;lkjh/.,mn"   ; human readability
}

; Now define all hotkeys
Loop % StrLen(original)
{
  c1 := SubStr(original, A_Index, 1)
  c2 := SubStr(mirrored, A_Index, 1)
  Hotkey Space & %c1%, DoHotkey
  Hotkey Space & %c2%, DoHotkey
}

return


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

; Not exactly mirror but as close as we can get, Capslock enter, Tab backspace.
Space & CapsLock::Send {Enter}
Space & Tab::Send {Backspace}

; If spacebar didn't modify anything, send a real space keystroke upon release.
+Space::Send {Space}
Space::Send {Space}
  
; Define special key combos here (took them from RG's mod):
^1::Send {Home}
^2::Send {End}
^3::Send {Del}

; General purpose
DoHotkey:
  StringRight ThisKey, A_ThisHotkey, 1
  i1 := InStr(original, ThisKey)
  i2 := InStr(mirrored, ThisKey)
  If (i1+i2 = 0) {
    MirrorKey := ThisKey
  } Else If (i1 > 0) {
    MirrorKey := SubStr(mirrored, i1, 1)
  } Else {
    MirrorKey := SubStr(original, i2, 1)
  }
  
  Modifiers := ""
  If (GetKeyState("LWin") || GetKeyState("RWin")) {
    Modifiers .= "#"
  }
  If (GetKeyState("Control")) {
    Modifiers .= "^"
  }
  If (GetKeyState("Alt")) {
    Modifiers .= "!"
  }
  If (GetKeyState("Shift") + GetKeyState("CapsLock", "T") = 1) {
    ; only add if Shift is held OR CapsLock is on (XOR) (both held down would result in value of 2)
    Modifiers .= "+"
  }
  Send %Modifiers%{%MirrorKey%}
return

Space & F1::
  ; Help-screen using SplashImage
  CoordMode Caret, Screen
  y := A_CaretY + 20
  If (y > A_ScreenHeight-100)
    y := A_CaretY - 20 - 100
  SplashImage HalfKeyboard_help.gif, B X%A_CaretX% Y%y%
  Sleep 5000
  SplashImage OFF
return

MenuExit:
  ExitApp
return


Cheers,
-mARKUS



TheCave
  • Members
  • 1 posts
  • Last active: Oct 15 2008 11:34 PM
  • Joined: 15 Oct 2008
This functionality is all kinds of awesome. What I love the most in this world is technology, and things that make my life lazier. Whenever something drifts into both categories I find myself helplessly attracted to it.

That being said, I find that to have the script running nonstop with any convenient key as the activator is a hassle because it inhibits my time spent typing normally. To that end, I tried to make the Caps Lock key the activator. Which I did, and it works fine, but I get all kinds of weird capitalization now. With the key activated the first letter is always capitalized and then anything beyond that is not. For example, if I were to type the word "position" with one hand it would come out looking like "PosItIon"

Also, the intended use for the key (that is, a capitalizing toggle) is beyond me for how it works with this script enabled. Sometimes it toggles normally, sometimes it does nothing. Usually it does nothing.

My code is basically an exact copy of what's been posted already except I rewrote it with Caps instead of Space. What can I do to get CapsLock to not capitalize every first letter of my activated typing? I never use the key which is why I chose it instead of Space or Tab or anything else, so I don't care about the normal function of the key. I would like it, though, if it could not get stuck in the On position, which is what tends to happen now.

kremlin
  • Guests
  • Last active:
  • Joined: --
This is loads of fun. I agree with max about that version being optimal from what's in the thread, but I see a couple of improvements to be made:

- I love holding shift-ctrl and tapping left/right/up/down/home/end to select chunks of text at a time. I'm trying to figure out how to implement this with one hand... it's not unfeasible to hold ctrl-shift-space and tap 2/3 (with 2/3 bound as left/right), but i'm having trouble writing the code to make that work.

- As I learn, I often identify quickly that the letter is on the right hand side, but then have to hunt for it. So I hold space and then search for the button to press, and tap it, and space doesn't repeat because the space character is only sent on keyup.

But when I'm typing a word in capital letters (capslock is awkward with this script) or even a single capital letter, I like to hold shift and then type as normal. but shift-space repeats the space character, so i can't shift-space and pause to hunt for a key! How can i keep shift-space's functionality but only make it produce a space on release and only if no other button has been pressed (like shift-less space behaves)?

If anyone has implementation ideas i would be ecstatic.

Calibran
  • Guests
  • Last active:
  • Joined: --
I'm using Markus script and it's a wonder.
I've added this modest line:

Space & Enter::Send {}

to cancel a mispressed space by immediately pressing enter (right handed).

I have a question for you savvy guys. Is there a way to make any letter capitalize if pressed more than, say half a second?
That would speed up the capitalization issue.