You know, I thought up yet another solution: Remapping your RAlt key to a LAlt key. That's a bit drastic in my opinion and I don't see why you silly Americans can't learn to use keyboards properly instead. ;D However, it'd be possible to do whether by a special program (can't think of which ones to use atm, and I'm not going to make you a script this time) or by registry remapping.
Now, I think the Colemak install has already made a registry remapping to achieve the Backspace-on-the-CapsLock-key effect. This means that we'll have to preserve the remapping already done and add the new effect. My registry remapping script (saved as a .reg file that can simply be double-clicked to be applied) looks like this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
; The next line maps RWin <- CapsLock <- BackSpace
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,0e,00,3a,00,3a,00,5c,e0,00,00,00,00
; The next line remaps only CapsLock <- BackSpace
;"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,0e,00,3a,00,00,00,00,00
; The next line removes all scancode remappings
;"Scancode Map"=-
[HKEY_CURRENT_USER\Keyboard Layout]
"Scancode Map"=-
; Numbers are LittleEndian (0x12345678 -> 78,56,34,12)
; ---------------------------------------------------------------------
; Bytes Meaning
; ---------------------------------------------------------------------
; 00 00 00 00 Version info (usually zero)
; 00 00 00 00 Flags (usually zero)
; 03 00 00 00 # of entries (# of mappings +1 for the terminator)
; 0e 00 3a 00 The CapsLock(3a) key now sends a BackSpace(0e) scancode
; 3a 00 5c e0 The RWin(e05c) key now sends a CapsLock(3a) scancode
; 00 00 00 00 Null terminator (always zero)
NB! My script remaps the CapsLock to the RWin key so I don't completely lose the CapsLock functionality. If you don't want that then use the commented-out line below instead which only does Backspace-on-CapsLock.
What you'd have to do to be sure of what you're up to, would be to start up regedit and browse to the addresses HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout and HKEY_CURRENT_USER\Keyboard Layout to check whether there's a "Scancode Map" key there. If there is, then that machine is already using some remapping on the machine or user level.
The left Alt has scancode #0038 and the RAlt has #e038. So you'd have to fix the key by adding 1 to the 9nth byte in the Scancode Map key and then adding new bytes that say "38,00,38,e0" before the last four zero bytes in the same key. If that sounds technical, here's how I'd add that to my script (the salient parts only):
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
; The next line maps RWin <- CapsLock <- BackSpace and RAlt <- LAlt
"Scancode Map"=hex:00,00,00,00,00,00,00,00,04,00,00,00,0e,00,3a,00,3a,00,5c,e0,38,00,38,e0,00,00,00,00
Now, if you do want to keep the RAlt in some cases you might make one .reg script that remaps it to a LAlt and another that remaps it back to RAlt. The latter could be done with a simple wiping (like the commented-out line in my script) but that'd also remove any other registry remappings so you'd probably want to just have one script with the expanded line and one with the old line.
Source: https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html among others.
Last edited by DreymaR (16-Apr-2008 09:37:00)