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
SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
@Dave N:

Edit3a - 2011-02-21 - <!-- m -->http://www.autohotke... ... 783#228783<!-- m -->

- Added URLDownloadToFile for missing icon and keyboard layout images downloaded from <!-- w -->www.autohotkey.net<!-- w --> if not found in %A_ScriptDir%
- Added menu option to show keyboard layout in an AlwaysOnTop Gui (via Tray)

JamesD
  • Guests
  • Last active:
  • Joined: --
As a newbie to this (preparing for one-handed typing during recovery from an impending op) - I am finding this utterly confusing - is there any chance anyone who feels suitable empowered could implement some kind of source control on all this, maybe using a repository like GitHub and uploading an identifiable, working base script or scripts, then others can upload variations as branches or some such?

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
@JamesD: there are various version in this thread each with their own pros/cons try one, for example "edit 3a" here (has a tray menu with a permanent help gui if to help you learn) <!-- m -->http://www.autohotke... ... 783#228783<!-- m -->

what you suggest won't happen and would be similarly confusing (which version to try first on github, most people probably wouldn't know how to download something either, here it is just copy paste) But you do have to read a lot I'll admit that.

kcTX
  • Members
  • 3 posts
  • Last active: Mar 22 2011 03:55 PM
  • Joined: 18 Mar 2011
Please forgive my total newbie-ness If you get annoyed at dumb questions, pls let someone else respond. My morale is at an all time low as it is.

v3a is bouncing back an error, and i just don't have the scripting know-how to troubleshoot it.While i am adept at normal computer use--and am the go to person for my colleagues-- i am not a coder and have never used scripts.

...but I am in desparate straits....going on week 5 with a broken radial head and right arm is still useless for keyboarding *unless you have a perverse liking for having a low level charly horse all day after ~5 minutes of use!!

Here's is what things look like so far:
I've downloaded AHK, then new>ahkscript
in the resulting doc,
>edit script
after the intro stuff they've already pre-entered, I've entered the 3a script referenced above, but keep getting the following when i try to run it:
===============
error at line 67
line text: '
error: the leftmost character above is illegal in an expression
the program will exit

===============
I can't seem to find any references to such an error in the forum string...forgive me if I've missed it. And even if i found the errant character in the script, i wouldn't know what to put in its place.

Can't imagine what I might have done to have gotten an error message that no one else has.

Pls don't think me lazy for not learning scripting so i can solve myself....normally i would jump right in....but life has been anything but normal for me in this one-handed world!

Thanks to any kind-hearted soul who can lend me a hand!

kathy

ps oh lord have mercy...after posting decided to see if there was anything about the script that I could decipher.....was i supposed to pick and choose parts to use or delete depending on language/character set I needed?All of this is quite beyond me..i'd let it all go if my job wouldn't suffer as a result!

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
Do you know which Autohotkey version you downloaded and installed? There are two versions AHK Basic and AHK_L.

Try again, but a bit differently this time: Just open notepad, copy and paste the code (make sure you have all lines) and save it as half.ahk (don't forget to type the .ahk extention). If you now double click the script it should run without flaws, as a first question it will ask you if you wish to download the missing images, just say yes and it will load an icon and two keyboard layout images that can help you learn to type. It will only do that when you run it for the first time.

kcTX
  • Members
  • 3 posts
  • Last active: Mar 22 2011 03:55 PM
  • Joined: 18 Mar 2011

Posted: Fri Mar 18, 2011 11:28 pm Do you know which Autohotkey version you downloaded and installed? There are two versions AHK Basic and AHK_L.

Thanks so much for being willing to help!!!

I'm using AHK_L..should I have used the other?? OK, so now I've gone back to the 3a post, hit the copy button, and pasted code into a new notepad doc, saved as ahk.but got the same result...(' is "illegal in an expresson") just a different line number....line 34.

I'm mystified..what is it about my situation/setup that could be messing me up?? If it makes any difference, I'm running windows 7.I'm soo hoping to figure this out! Thanks for any additional ideas/suggestions you may have...

PS should i be pm-ing all this? Don't want to clog up the thread..but someone else may be interestede in the solution....

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
OK, I found the problem, you are running AutoHotkey_L, unicode version, which is fine, but it also means you have to save your AutoHotkey files in the unicode format for scripts to work correctly.

So open the script you have saved in Notepad again, and now choose File, Save As. You should see an Encoding option, it is probably ANSI, set it to Unicode and save the script. If you now run it the script should run fine.

kcTX
  • Members
  • 3 posts
  • Last active: Mar 22 2011 03:55 PM
  • Joined: 18 Mar 2011
Thank you so very much! I am writing this with the script..a little slow at first, but I'm sure I'll get the hang of it!!
HEART FELT THANKS!!
KC


pkamb
  • Members
  • 3 posts
  • Last active: Mar 21 2012 10:29 PM
  • Joined: 05 Apr 2011
I'm not trying to derail this thread or spam. However I wanted to bring up my non-autohotkey solution to this same one-hand keyboard problem.

It's called One-Hand Keyboard, found here:
http://www.onehandkeyboard.org/

It's the same concept as the AHK scripts in this thread. However it has one important advantage: it uses predictive text rather than use the spacebar as a modifier.

You simply type your word according to the "one hand rules" previously discussed. No need to manually choose which character you want via spacebar, just hit the key. The software figures out which word you are most likely trying to type.

So if you tap "tges" with your left hand, One-Hand Keyboard knows you really wanted the word "this". Note that it does this better than a simple AHK word replacement... the most likely characters are always presented. Pressing "tg" outputs the far more likely "th" despite that not being an exact word match.

Turn it on/off via Caps Lock. Switch between alternate word choices with Tab.

I actually started development using AHK over a year ago, but soon switched to a real programming language when the predictive text became too complicated for AHK to handle. Wanted to bring it back to the community here though, let me know what you think.

The trial is very unrestricted, so give it a try. One-Hand Typing. Let me know how the predictive text compares to the AHK "use spacebar as a switch" way or anything else you find.

Thanks.

guest2
  • Guests
  • Last active:
  • Joined: --
I was looking for this functionality a few years ago. So, I've found it here...
When I using the script, I've made some "improvement"/restructuring. Maybe someone find them useful. Here is my latest edition.

1. Works not only with Latin.
2. Try to understand two, not more, simultaneous "keystrokes".
3. By a small delay, - "capital" letter (it was worth the loss of responsiveness).
4. Fast writing does not bring big problem.

obM - there are pairs of keys, you can change them as you want.
If you want to trigger long press for a key, the key have to be in obM (e.g. "6": "6", if you dont need replace "6" to another key, but want "^").
I dont test it on numpad keys and function keys. Dont see the problem.

Sorry for my English and coding.

obK2S := { "Esc": "sc01", 1: "sc02", 2: "sc03", 3: "sc04", 4: "sc05", 5: "sc06", 6: "sc07", 7: "sc08", 8: "sc09", "q": "sc010", "w": "sc011", "e": "sc012", "r": "sc013", "t": "sc014", "y": "sc015", "u": "sc016", "i": "sc017", "o": "sc018", "p": "sc019", "d": "sc020", "f": "sc021", "g": "sc022", "h": "sc023", "j": "sc024", "k": "sc025", "l": "sc026", ";": "sc027", "'": "sc028", "``": "sc029", "b": "sc030", "n": "sc031", "m": "sc032", "`,": "sc033", ".": "sc034", "/": "sc035", "RShift": "sc036", "NumpadMult": "sc037", "LAlt": "sc038", "Space": "sc039", "F6": "sc040", "F7": "sc041", "F8": "sc042", "F9": "sc043", "F10": "sc044", "NumLock": "sc045", "ScrollLock": "sc046", "Numpad7": "sc047", "Numpad8": "sc048", "Numpad9": "sc049", "Numpad2": "sc050", "Numpad3": "sc051", "Numpad0": "sc052", "NumpadDot": "sc053", "F11": "sc057", "F12": "sc058", 9: "sc00A", 0: "sc00B", "-": "sc00C", "=": "sc00D", "Backspace": "sc00E", "Tab": "sc00F", "[": "sc01A", "]": "sc01B", "Enter": "sc01C", "LControl": "sc01D", "a": "sc01E", "s": "sc01F", "LShift": "sc02A", "\": "sc02B", "z": "sc02C", "x": "sc02D", "c": "sc02E", "v": "sc02F", "CapsLock": "sc03a", "F1": "sc03B", "F2": "sc03C", "F3": "sc03D", "F4": "sc03E", "F5": "sc03F", "NumpadSub": "sc04A", "Numpad4": "sc04B", "Numpad5": "sc04C", "Numpad6": "sc04D", "NumpadAdd": "sc04E", "Numpad1": "sc04F" }

obM := { 1: "-", 2: 0, 3: 9, 4: 8, 5: 7, 7: 5, 8: 4, "q": "p", "w": "o", "e": "i", "r": "u", "t": "y", "y": "t", "u": "r", "i": "e", "o": "w", "p": "q", "d": "k", "f": "j", "g": "h", "h": "g", "j": "f", "k": "d", "l": "s", ";": "a", "'": "``", "b": "n", "n": "b", "m": "v", "`,": "c", ".": "x", "/": "z", 9: 3, 0: 2, "-": 1, "a": ";", "s": "l", "z": "/", "x": "." , "v": "m", "c": "`,", "``": "=", "F1": "[", "F2": "]", "TAB": "`\", "[": "TAB", "6": "6"}

g_sp := 0, g_cm := 0, g_ch := "", g_ch2 := ""
tickTime := Object()

for k, i in obK2S
	obK2S[k] := "{" . i . "}"

for k, i in obM
{
	obM[k] :=  obK2S[i]
	Hotkey %k%, KeyDown1
	Hotkey %k% UP, KeyUp1
}

!space::
^space::
	g_cm := 1
	Send {blind}{space}
return

*space::
	Send % obK2S[g_ch]
	g_cm := 0, g_sp := 1, g_ch := ""
return

space up::
	if g_cm
	{
		send, % obM[g_ch]
		g_ch := ""
	}
	else
		send, {space}	
	g_sp := 0
return
   
KeyDown1:
	if ! tickTime[a_thishotkey]
		tickTime[ g_ch <> "" ? ( g_ch2 := a_thishotkey ) : ( g_ch := a_thishotkey ) ] := A_TickCount
return

KeyUp1:
	Send % ( A_tickCount - tickTime[g_ch] > 290 ) ? "+" . ( g_sp ? obM[g_ch] : obK2S[g_ch] ) : ( g_sp ? obM[g_ch] : obK2S[g_ch] ) 
	tickTime[SubStr(a_thishotkey,1,strlen(a_thishotkey)-3)] := 0, g_cm := g_ch <> "" ? g_sp : 0, g_ch := g_ch2, g_ch2 := ""
return


pkamb
  • Members
  • 3 posts
  • Last active: Mar 21 2012 10:29 PM
  • Joined: 05 Apr 2011
My free Mac app with this exact functionality now on the Mac App Store. It really is an awesome way to type with one hand, two-hand touch typists already have the muscle memory.

Mirror-QWERTY:
<!-- m -->http://itunes.apple.... ... 1762?mt=12<!-- m -->

If anyone tries it, let me know what you think.

  • Guests
  • Last active:
  • Joined: --

I'm not trying to derail this thread or spam. However I wanted to bring up my non-autohotkey solution to this same one-hand keyboard problem.

But you are doing it none the less by posting in the one hand keyboard threads here on AutoHotkey. Twice is enough thank you. AutoHotkey is a Windows application in case you care and anybody can modify the script to their liking and is free.

pkamb
  • Members
  • 3 posts
  • Last active: Mar 21 2012 10:29 PM
  • Joined: 05 Apr 2011
I agree. I argued with myself about posting it here but thought some people might be interested in the Mac OS X version, where we can't have AHK. Thanks.

GuestAbove
  • Guests
  • Last active:
  • Joined: --
Well as it is a free Mac app so I don't mind actually ;-)

Guest
  • Guests
  • Last active:
  • Joined: --
I realize nobody has used this format for a while but I was hoping somebody could help me as to just how to make these codes work. I found a mirror code online but it types an exact mirror and isn't great with punctuation and stuff.