| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Remapping for Coders

Page history last edited by Jack Snoeyink 12 years, 5 months ago

 

Home > Remapping > Remapping for Coders

 

A number of AlphaGrip users, primarily coders, remapped the Grip’s character configuration to optimize it for coding, with a free, open-source utility called AutoHotkey. Carl Andersen created the first remap, which serves as the foundation for majority of other remaps.

 

One application some coders found useful is the Ctrl-Alt Duplicator. When activated, the Ent button functions as CTRL and the BkSpace button functions as ALT. Another is the Shift Duplicator, which gives Shift functionality to the Print Screen button.


Other Remaps




AutoHotkey Remapping for VI

From: ivanwfr Date: Fri, Apr 28 2006 10:16 am

In the mood of "h j k l" for vi, here is something with AutoHotkey. (I prefer a layout more like the reverse T placement for arrow keys; but it is quite easy to change that):

 

 

= = = = = = = = = = = = = = = = = = = = = = = = =

MOUSE POINTER from the keyboard:

#I::MouseMove, 0,-30, 0, R ; UP

#L::MouseMove, 30, 0, 0, R ; RIGHT

#K::MouseMove, 0, 30, 0, R ; DOWN

#J::MouseMove, -30, 0, 0, R ; LEFT

#U::MouseClick,left ; LEFT BUTTON CLICK

= = = = = = = = = = = = = = = = = = = = = = = = =

Idem but slowly:

^#I::MouseMove, 0,-5, 0, R ; UP

^#L::MouseMove, 5, 0, 0, R ; RIGHT

^#K::MouseMove, 0, 5, 0, R ; DOWN

^#J::MouseMove, -5, 0, 0, R ; LEFT

^#U::MouseClick,left ; LEFT BUTTON CLICK

= = = = = = = = = = = = = = = = = = = = = = = = =

TEXT CURSOR near home-row:

^+I::Send {UP}

^+L::Send {RIGHT}

^+K::Send {DOWN}

^+J::Send {LEFT}

= = = = = = = = = = = = = = = = = = = = = = = = =

 


Can’t Remap on a Mac

From: ollie Date: Wed, Apr 12 2006 10:40 pm

I have had my AlphaGrip for a few days. I am enjoying it, though I have to break back to the normal keyboard to do some time-bound work (from 55wpm down to eight, ugh. but improving!). It gets a lot of attention here at work.

 

I immediately wanted to remap the keys for a couple of Mac-specific reasons: it is almost impossible to press command-c and command-v for copy/paste. I decided to move backspace and enter to the left thumb, and put C and V in their place (putting several common control and command keys on the right thumb). At the same time, I also wanted to put L and Y on the bottom and swap it with the period, comma, colon, etc.

 

I initially tried to use Ukelele, but it for some reason was not saving the Unicode character codes I pasted in (I verified by opening the files in a text editor). I then created my own key mappings manually, in said text editor... time consuming, but I got it to be just how I wanted it. In the end, I had it 99% working in TextEdit, except that the backspace key would not send c as I had remapped it to, rather it persisted in sending backspace. Even worse, in my 'real' editor (BBEdit, none of the non-character keys worked at all... some remappings worked, but not Enter, Backspace, Tab, etc.

 

Note : Try KeyRemap4Macbook; it can recognize your Alphagrip and apply the remap only to that.  See as an example Jack Snoeyink's Remap for PC and Mac.


Character Frequency Analysis

Letter Frequency Data

From: Matthias Schult Date: Sun, Apr 16 2006 1:25 pm

My script counts the contents of Wikipedia.

 

2874082103 characters for English of pure text (4.9GiB), 1143359645 characters for German (1.8GiB), and so on.

 

That should be an even better base.

 

Counting single characters, pairs and triples, filtering wikitext and xml/html. …

 

Most common characters in English:

 

Proportion - - - - - - - - - - - - - - Statistical error - - - - - - - Count - - - - - - Statistical error - - - "Characters"

0.156302203590876 - - - - 7.37450654270641e-06 - - - 449225366 - - - 21194.9372728489 - - - - - " "

0.0911504190247553 - - - 5.63157340832654e-06 - - - 261973788 - - - 16185.604344602 - - - - - - "e"

0.0664841706507088 - - - 4.80960646433676e-06 - - - 191080965 - - - 13823.2038616234 - - - - - "a"

0.0646633921160463 - - - 4.74328976628841e-06 - - - 185847898 - - - 13632.6042266326 - - - - - "t"

0.0578548820252683 - - - 4.48663170520168e-06 - - - 166279681 - - - 12894.9478866725 - - - - - "i"

0.0562469255249386 - - - 4.42384405468201e-06 - - - 161658282 - - - 12714.4910240245 - - - - - "o"

0.0553985214388289 - - - 4.39035361917693e-06 - - - 159219899 - - - 12618.2367627177 - - - - - "n"

0.0509099485527119 - - - 4.20873657331604e-06 - - - 146319372 - - - 12096.2544616092 - - - - - "r"

0.0507578495575079 - - - 4.20244484190578e-06 - - - 145882227 - - - 12078.1715089661 - - - - - "s"

0.0497214873753382 - - - 4.15932130546235e-06 - - - 142903637 - - - 11954.2309246559 - - - "<SHIFT>"

0.034121994600514 - - - - 3.44562190555095e-06 - - - 98069414 - - - - 9903.00025244875 - - - - - "h"

0.0333102703990499 - - - 3.40439147170719e-06 - - - 95736452 - - - - 9784.50060043945 - - - - - "l"

0.0291122118302269 - - - 3.18264365973717e-06 - - - 83670887 - - - - 9147.17918267703 - - - - - "d"

0.026743931191029 - - - - 3.05044386867675e-06 - - - 76864254 - - - - 8767.22612916993 - - - - - "c"

0.0251501559139697 - - - 2.95815383857856e-06 - - - 72283613 - - - - 8501.9770053794 - - - - - - "e"

0.0211427860521353 - - - 2.71226126957509e-06 - - - 60766103 - - - - 7795.26157354582 - - - - - "u"

0.0207808816378827 - - - 2.68894797195548e-06 - - - 59725960 - - - - 7728.2572420954 - - - - - - "m"

0.0196281710049673 - - - 2.61330639568669e-06 - - - 56412975 - - - - 7510.85714149857 - - - - - "t"

0.0177139779503369 - - - 2.48260979595866e-06 - - - 50911427 - - - - 7135.22438329728 - - - - - "th"

0.0170916676140619 - - - 2.43861159274421e-06 - - - 49122856 - - - - 7008.76993487445 - - - - - "a"

0.016736231003906 - - - - 2.41312181441003e-06 - - - 48101302 - - - - 6935.51021915475 - - - - - "f"

0.0165913506612167 - - - 2.40265428940955e-06 - - - 47684904 - - - - 6905.42569288817 - - - - - "p"

0.0165885960426232 - - - 2.40245482792368e-06 - - - 47676987 - - - - 6904.8524242014 - - - - - - "s"

0.0154844887533124 - - - 2.32112671606001e-06 - - - 44503692 - - - - 6671.10875342323 - - - - - "he"

0.0153605225661154 - - - 2.3118167720146e-06 - - - - 44147403 - - - - 6644.3512098624 - - - - - - "g"

0.0142667834566033 - - - 2.22799108937249e-06 - - - 41003907 - - - - 6403.42931560894 - - - - - "in"

0.0130209543982537 - - - 2.12849102759163e-06 - - - 37423292 - - - - 6117.45796879717 - - - - - "th"

0.0129558118611617 - - - 2.12316003739309e-06 - - - 37236067 - - - - 6102.13626527628 - - - - - "n"

0.012919075262757 - - - - 2.12014775810852e-06 - - - 37130483 - - - - 6093.47872729527 - - - - - "er"

Total counted characters: - - - - - - - - - - - - - - - - - 2874082103

 


Character Frequency Study for Coders

From: ollie Date: Fri, Apr 21 2006 1:30 pm

I agree that this information is useful for optimizing key layout, but bear in mind that a standard keyboard has to be used for a lot more than writing English (or any other human-spoken language). I write much more code than email, so getting to all the punctuation necessary is important for me (and likely for other AlphaGrip users). A good source (pun intended) for code examples would be sourceforge.net, and I would recommend mixing several commonly used languages: C/C++, Java, perl (lots of punctuation!), XML, etc...

 

Another thing, which a keyboard has got to be not only used for but also good at, is control-key sequences. I suspect somewhere there are analyses of actual keystroke data from people working at various tasks. This would be what I think we need as the basis for key frequency in creating/optimizing a layout.

 

Also see: Letter Frequency

 


Chording

Chording for Enter, Space and BkSp, Generate J, V, Y, K, X and Z with Yellow Shift

From: Lee Date: Tues, Mar 28 2006 4:21 pm

I posted the chording of enter, space and bksp. This is purely supplemental. You can still use the Blue shift to get to these and perform repetition. Just like you have enter in two locations on a QWERTY keyboard, this gives you enter on two locations on the AlphaGrip. I have actually modified my AHK file to put enter back on the red shift of the L, also, like the original mapping, giving me a total of three enters on the device. If you're not going to replace it with something, you might as well leave the original there.

 

Also, was there a reason for Carl to move the number mapping? It seems to me like it should be left the way it was originally, that way you can still the Num Lock on the AG and even use the RED SHIFT on the AG.

 

Perhaps your issues with J, V, Y, K, X and Z could be resolved by adding these as Yellow shift characters. There are openings on six keys to provide Yellow shift, the exact number that you need.

 


Negatives to Chording

From: oggie rob Date: Tues, Mar 28 2006 3:24 pm

Since we're discussing the future of AlphaGrip I thought I would mention a reservation I have about chording. It didn't seem too much of an issue before now but I've finally got to use my AG as a "primary" keyboard instead of just "whenever I felt like it" - when I found that chording has some serious usability problems. (This is what I've found with Carl's release 1a - the one that is posted on AlphaGrip's site.)

 

Here are two problems that arise when you use chorded keys:

 

- The possibility of errors increases. With training, this can be minimized but it will still show up occasionally.

- Key-based tools like vi, or any other command-based tools, are difficult to use with chorded keys.

 

I found this out when I logged into an old FreeBSD machine and needed to edit a file. As soon as I started to scroll down (using "j"), it was obvious that chording was problematic. Not only was it very slow to scroll (you cannot hold down the j key to scroll), quite frequently I missed the keys and accidentally running the other commands (i.e. when going up, using "k", I ended up editing the file because one of the keys was "i").

 

My assumption is this would be more of a problem if more of the keys were chorded. I saw mention of using space, bkspace and enter using chorded keys - well, these face the same problem (try deleting 20 characters)….

 


Determining “Best” Character Layout

From: ivanwfr Date: Sun, Apr 9 2006 6:43 pm

I created an interactive tool that may help us to evaluate a particular layout.

 

The start point would be the layout of the keyboard we use everyday. The tool would display an AG5 layout we want to evaluate alongside with an interactive On Screen Keyboard with a QWERTY layout. Hey, I come in peace Dvorak would be next ;)

 

The ideal tool would help us to make the following real-time observations:

  • What are the letters associated with each finger. (QWERTY vs. AG5)
  • What are re required chording?
  • What are the gestures for most used character sequences.
  • ...your ideas here...

 

At first, I thought it would require a complete Java application or some other GUI capable development environment to do that. And guess what... that was not true!

 

Here is the beginning of something that anyone who has not yet dumped Internet Explorer yet may use. Yes, Opera and Firefox are yelling with JavaScript and CSS complains... We can take care of that later...

 

This is only a start, many things I have in mind are still missing.

  • To mention one for instance: color-shift chording is not there yet.
  • Another that is sill missing is an easy and sharable configuration mean.

 

If you think of something useful based on this, just tell about it.

 

Just have a look here and tell me how it works for you and if that makes sense...

 

http://ivanw.club.fr/AG/onscreen.html (rather IE friendly for the moment)

 

Its 3 images:

 

 

 

 

 

And the complete archive:

http://ivanw.club.fr/AG/onscreen.zip

 

I will update those same files with future versions…

 

… Here is what I mean by layout customization: (sorry for the monomania) http://fingerfans.dreamhosters.com/forum/viewtopic.php?t=161

 

Here is one more update on my Carl's layout AutoHotkey-script excavation:

  • I worked on dual key press handling, key tables presentation
  • Added a picture on dual press combination logic
  • Cleaned up handlers code a little and added some notes.

 

http://ivanw.club.fr/AG/AG5.ahk.html

 


Different Applications with Different Shortcuts

From: Toby Dickenson Date: Fri, May 12 2006 2:24 am

… Many applications have multiple different keyboard shortcuts for every one function, and the easiest shortcut is sometimes different between keyboard and AG5.

 

For example I am a heavy user of Ctrl+Fn to switch virtual desktops in kde. Control+Tab is functionally equivalent, but I never used that combination until picking up the AG5.

 

That’s an interesting datapoint for anyone involved in gui design....

 


Keys that Can't be Remapped

Colored Number and Punctuation Shift Keys do not send Signal to Computer – can’t be Remapped by AutoHotkey

From: ivanwfr Date: Sun, Apr 9 2006 7:12 pm

… AutoHotkey has not a chance to receive anything from those color-shift keys.

 

They are quite unheard of in the Keyboard Scan Code specifications as opposed to the real shift key that sends events as if it were an ordinary letter.

 

Also, I have augmented Carl's script with comments that may help:

- http://ivanw.club.fr/AG/AG5.ahk.html

 

If you want to monitor what is sent to the USB driver:

 

- On windows you can do that with "mskey.exe"

- This is a Microsoft tool which is part of the package "IntelliType Pro 5.5"

 

mskey.exe is hidden here:

 

...\program files\Microsoft IntelliType5.2\IType\SETUP\Files\mskey.exe

 


Letter Frequency

From: jocafa Date: Sat, Apr 15 2006 11:40 pm

… In a spurt of boredom, I threw together a perl script to analyze text and give me stats on a few things. This data may be useful for figuring out how you may want to remap your grip, or perhaps for the AG6. It basically just counts up letters and letter pairs, then dumps this into something meaningful. I ran it on an aggregate of the following texts:

 

Accelerando, Alice's Adventure in Wonderland, Pride and Prejudice, The Adventures of Sherlock Holmes, War of the Worlds.

 

I figured those texts would give me a pretty good sample of the English language with general and proper usage. They were also free to download as .txt files (which made them easy to parse). You can find the results here.

 

 

Old Cryptography Studies

From: Mike Willner Date: Sun, Apr 16 2006 10:25 am

There is a high correlation between the results of your analysis and those in cryptography studies published in 1942 and 1943: Laurence Dwight Smith, Cryptography, 1943, New York, Dover Publications (frequency of single letters in the English language in descending order):

 

(E,T,O,A,N,I,R,S,H,D,L,C,W,U,M,F,Y,G,P,B,V,K,X,Q,J,Z)

 

and Donald Milliken, Elementary Cryptography and Cryptanalysis, 1942, New York University Bookstore:

 

(E,T,N,R,O,I,A,S,D,H,L,C,F,U,P,M,Y,G,W,V,B,V,K,Q,J,Z)

 

(the latter study relates to "newspaper English"); both cited in U.S. Pat. No. 5,352,050, issued in 1994 to John I. M. Choate, which, BTW, includes an excellent history on keyboard letter layouts. The only major difference is that both studies, unlike yours, indicate the letter "R" is used more frequently than the letter "H".

 

Mr. Choate argues, in this and other patents he's filed, that minimum finger movement increases text entry speed and reduces the risk of developing repetitive strain syndrome.

 

Also see: Character Frequency Study for Coders

 


Remap for Ctrl PgUp or PgDn

From: seabrook Date: Thurs, May 11 2006 12:31 am

I don't have any desire to switch to dvorak (alas, my brain is firmly qwertified) but I can definitely use that, thanks. :) (So) (m)aybe you can help me figure something out...

 

I spend most of my time in Linux in a gnome-terminal with multiple tabs. As a result, I make great use of CTRL+PgUp/PgDn to switch between said tabs. Unfortunately, it seems there's really no easy way to perform that sequence with the default mapping (ctrl + left red shift + ent). Can you think of a simple remapping to make it easier? I considered swapping X/Z with PgUp/PgDn, but then there'd be no easy way to make capital Xs and Zs. :\

 

 

Solution:

From: seabrook Date: Thurs, May 11 2006 6:19 pm

 

I just realized that the two tabbed apps that I use the most, gnome-terminal and Firefox, both allow tab switching via "ALT + " which should be easy enough to perform and may even be more efficient than the alternative, anyway.

Other Proposed Solutions

From: Mike Willner Date: Thurs, May 11 2006 7:43 am

 

You probably already know this, but just in case..., another way to do what you want without

 

Comments (0)

You don't have permission to comment on this page.