AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Half-QWERTY: One-handed Typing
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Mecdemort
Guest





PostPosted: Mon Jan 21, 2008 11:30 pm    Post subject: Reply with quote

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:

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

Code:
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
Back to top
Mecdemort
Guest





PostPosted: Tue Jan 22, 2008 12:45 am    Post subject: Reply with quote

The full script with working tab and space+tab:

Code:
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
Back to top
ChuckEgg
Guest





PostPosted: Wed Jan 30, 2008 3:42 pm    Post subject: Reply with quote

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 Smile 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.
Back to top
fmate14



Joined: 28 Oct 2007
Posts: 72
Location: Hungary, Érd

PostPosted: Sat Feb 09, 2008 10:08 am    Post subject: Portable Keyboard Layout Reply with quote

rubo77 wrote:
so i invented a new layout, ENTI-Key++
www.entikey.z11.de
...
is it possible to create an autohotkey-script for that layout?

Yes, it is possible. See http://www.autohotkey.com/forum/viewtopic.php?t=28447
_________________
Portable Keyboard Layout
Happy Sunday
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Sun Sep 21, 2008 11:57 pm    Post subject: Help - Directions Reply with quote

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
Back to top
AAC



Joined: 25 May 2006
Posts: 9

PostPosted: Mon Sep 22, 2008 2:33 pm    Post subject: Help - Directions Reply with quote

Hi "Guest",

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

Mike
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Wed Sep 24, 2008 2:02 pm    Post subject: Reply with quote

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.
Back to top
AAC



Joined: 25 May 2006
Posts: 9

PostPosted: Wed Sep 24, 2008 2:15 pm    Post subject: Half Qwerty Reply with quote

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


Code:

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


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

******Don't copy this line!***********

; 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.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Wed Sep 24, 2008 11:09 pm    Post subject: Reply with quote

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?
Back to top
Guest






PostPosted: Wed Sep 24, 2008 11:19 pm    Post subject: Reply with quote

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
Back to top
AAC



Joined: 25 May 2006
Posts: 9

PostPosted: Thu Sep 25, 2008 5:57 pm    Post subject: Reply with quote

That's good. Feel free to ask any questions or suggest improvements.
Mike
Back to top
View user's profile Send private message Send e-mail
max



Joined: 29 Sep 2008
Posts: 1

PostPosted: Tue Sep 30, 2008 12:15 am    Post subject: Reply with quote

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 http://warped.org/linux/HalfKeyboard.zip just in case.


Also, since i'm using my left hand, I made this tweak to get ' and - nearby :
Code:

original := "``" . "12345qwertasdfgzxcvbh"   ; split up string for better
mirrored := "-"  . "09876poiuy;lkjh/.,mn'"   ; human readability


and added pageup/pagedown as ctrl5/6
Code:

; 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

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



And the icon.

Here comes the code:

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
Back to top
View user's profile Send private message
TheCave



Joined: 16 Oct 2008
Posts: 1

PostPosted: Thu Oct 16, 2008 12:36 am    Post subject: Caps as activator Reply with quote

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.
Back to top
View user's profile Send private message
kremlin
Guest





PostPosted: Fri Oct 17, 2008 12:22 pm    Post subject: Reply with quote

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.
Back to top
Calibran
Guest





PostPosted: Sat Oct 18, 2008 12:34 am    Post subject: Capitalize letters Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 5 of 9

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group