Author Topic: Truly Ergonomic Autohotkey script  (Read 7098 times)

0 Members and 1 Guest are viewing this topic.

Offline Rajagra

  • Thread Starter
  • Posts: 1930
Truly Ergonomic Autohotkey script
« on: Fri, 06 January 2012, 06:26:16 »
I've tweaked my Eezeboard script to work better with the Truly Ergonomic board. It isn't really needed, but I thought I'd share. If nothing else, it makes the function keys easier to use. This layout has a lot of duplicated keys, for ease of access/memorising.

Edit> Also added a Menu (Appskey) key - the key that the TE missed out altogether! To get this, press Ext B

To use, set the TE left space bar to 'alternate' mode via the DIP switch. Run the AutoHotKey script (or the compiled version.) The left space bar will now work as an Extend or Extra key. Hold down the Ext. key along with another key to get the desired function.

The layout: http://www.g-ray.co.uk/TEezeboard/TEezeboard.jpg
The script: http://www.g-ray.co.uk/TEezeboard/TEezeboard.ahk
Compiled version: http://www.g-ray.co.uk/TEezeboard/TEezeboard.exe



P.S. ...
Ext Enter = Caps Lock
Ctrl Ext Enter = Scroll Lock
Alt Ext Enter = Num Lock
« Last Edit: Fri, 06 January 2012, 08:06:00 by Rajagra »

Offline limmy

  • Posts: 352
Truly Ergonomic Autohotkey script
« Reply #1 on: Sat, 21 January 2012, 03:35:56 »
This is great. Suddenly TE is more tempting.

If you use the Alt key as Fn key(or in your term Ext key), do you lose functionality of any of the Alt keys? Judging from the scan code in the autohotkey code(see note 1 below), it seems it wouldn't be affected, but I want to be sure.

Note1: LAlt and RAlt scan code from my HHKB(SC038,SC138 respectively) is different from the scan code for the left space bar of TE(SC05C).

Offline Rajagra

  • Thread Starter
  • Posts: 1930
Truly Ergonomic Autohotkey script
« Reply #2 on: Sat, 21 January 2012, 13:22:02 »
Quote from: limmy;495419
If you use the Alt key as Fn key(or in your term Ext key), do you lose functionality of any of the Alt keys? Judging from the scan code in the autohotkey code(see note 1 below), it seems it wouldn't be affected, but I want to be sure.

Note1: LAlt and RAlt scan code from my HHKB(SC038,SC138 respectively) is different from the scan code for the left space bar of TE(SC05C).

You can change the line:
FnKey=SC05C
to one of the following:
FnKey=LControl
FnKey=RControl
FnKey=LAlt
FnKey=RAlt
FnKey=LShift
FnKey=RShift

The script will still allow use of Alt/Ctrl/Shift on the opposite side to the one used as the extend/FnKey.
But be warned that the right-hand Alt is odd - it can be seen as Ctrl-left Alt, causing odd things to happen.

You can also comment out any lines for functions you don't want. For example, if you don't want Ext. F to work as F8, add a semicolon to the start of the line:
Hotkey, %FnKey% & SC021, Fn_F8            ; F key
You can then use Alt-F for the file menu, using either Alt key, even if an Alt key is defined as extend/FnKey.

Offline Keymonger

  • Posts: 166
Truly Ergonomic Autohotkey script
« Reply #3 on: Sat, 21 January 2012, 13:59:06 »
*incoming rant*

Tried remapping keys with AutoHotkey myself but it doesn't seem to work with my touch type software for some reason. I'm pretty much selling my TE. Number one, it's not that good. Number two, their own firmware app should've been ready. Number three, my prototype will smoke this keyboard. It's just not so good that I'm going to commit to learning to type on this thing. It's a stepping stone at best.

I see you used the left space bar as "Ext" in your script, Raj. I've always had something like that in mind, but I'd just use Shift in its place. For the thumb to handle modifiers is an idea I've always liked.

Offline limmy

  • Posts: 352
Truly Ergonomic Autohotkey script
« Reply #4 on: Sun, 22 January 2012, 03:12:03 »
I was asking whether you would lose any Alt keys if you use your code as is(FnKey=SC05C). I was curious because SC05C was meant to be an Alt key under 'alternate' mode.

Also, I found something weird today. I am using Left Win key as Ext key and when I press LWin combination Left control down and up events register. For example, if I press LWin+k, which is mapped to Down, I see the following events in the key history. Please note that I didn't press any of control keys.
5B  15B       u   0.00   LWin              
5B  15B       d   24.68   LWin              
5B  15B       d   0.25   LWin              
5B  15B       d   0.03   LWin              
A2  01D   i   d   0.03   LControl          
A2  01D   i   u   0.00   LControl          
5B  15B   i   u   0.00   LWin              
73  03E   i   d   0.00   F4                
73  03E   i   u   0.00   F4  

It works most of the time, but it acts strangely when an application takes single control press as an input. e.g. Chrome for instance on the address bar while browsing drop down list. I think this is a bug in Autohotkey. It happens when I use LWin or LAlt as Fn key, but doesn't happen if I use LShift or CapsLock.

Do you have experience in resolving this issue?

BTW, Thanks for the script. I am loving it. I made 3 layers modifying your code. I created 3 layers using LWin, CapsLock, and RCtrl as respective Fn key. If you are interested, you can find the code along with the layout image at http://www.kbdmania.net/xe/3481674. The webpage is in Korean but the image and ahk file is in English.

Quote from: Rajagra;495663
You can change the line:
FnKey=SC05C
to one of the following:
FnKey=LControl
FnKey=RControl
FnKey=LAlt
FnKey=RAlt
FnKey=LShift
FnKey=RShift

The script will still allow use of Alt/Ctrl/Shift on the opposite side to the one used as the extend/FnKey.
But be warned that the right-hand Alt is odd - it can be seen as Ctrl-left Alt, causing odd things to happen.

You can also comment out any lines for functions you don't want. For example, if you don't want Ext. F to work as F8, add a semicolon to the start of the line:
Hotkey, %FnKey% & SC021, Fn_F8            ; F key
You can then use Alt-F for the file menu, using either Alt key, even if an Alt key is defined as extend/FnKey.

Offline Rajagra

  • Thread Starter
  • Posts: 1930
Truly Ergonomic Autohotkey script
« Reply #5 on: Sun, 22 January 2012, 07:14:34 »
I don't know what TE did with their 'Alternate' use of the left space bar. It isn't an Alt key code. The best match I could find is that SC05C is sent by the F14 key on some keyboards.

I too have noticed the odd behaviour of AutoHotkey. It may be a bug, or maybe I'm missing something. It's as if AHK doesn't always react in time.

My normal fix is to use KeyTweak to remap a key as the "Macintosh keypad =" code in the registry, then use that as the extend key. This works very well since Windows doesn't try doing anything with it. I assume you could remap keys to any unused code if you needed multiple extend keys that Windows ignores.

Offline Architect

  • Posts: 254
  • TECK Lover
Truly Ergonomic Autohotkey script
« Reply #6 on: Sun, 22 January 2012, 09:05:48 »
Quote from: Rajagra;496139
I don't know what TE did with their 'Alternate' use of the left space bar. It isn't an Alt key code. The best match I could find is that SC05C is sent by the F14 key on some keyboards.

Its International6, documented in the manual I believe.

Quote from: Keymonger;495696
I'm pretty much selling my TE.

Check if its still under the 30 day return policy, I think we're close.
TECK 209 Blank Keys; Leopold Number Pad; X-Keys Professional; X-Keys 84.

Offline limmy

  • Posts: 352
Truly Ergonomic Autohotkey script
« Reply #7 on: Sun, 22 January 2012, 10:18:06 »
Quote from: Rajagra;496139
I don't know what TE did with their 'Alternate' use of the left space bar. It isn't an Alt key code. The best match I could find is that SC05C is sent by the F14 key on some keyboards.

I too have noticed the odd behaviour of AutoHotkey. It may be a bug, or maybe I'm missing something. It's as if AHK doesn't always react in time.

My normal fix is to use KeyTweak to remap a key as the "Macintosh keypad =" code in the registry, then use that as the extend key. This works very well since Windows doesn't try doing anything with it. I assume you could remap keys to any unused code if you needed multiple extend keys that Windows ignores.

I see what is going on now. I thought Alternative mode was supposed to give you "Left space=Alt", but it is apparently not so.

Also, thanks for the tip! It works even better. It is now more responsive and most importantly not skipping hotkey association any more. Previously, if I hold down a hotkey that acts as down key for instance, it some times skips and type in the character used in the hotkey, in my case "k". This randomness was unacceptable and I would have abandoned the whole idea unless I came by your tip.

However, this solution of touching up registry is somewhat costly in the sense that it is now more restrictive. If you are planning to use the layout in a PC for which you don't have admin rights, then it is unusable.