• You are not logged in.

    AltGr is the same as ctrl-lalt on Win XP

    • Started by Cynebeald
    • 5 Replies:
    • Reputation: 0
    • Registered: 07-Apr-2008
    • Posts: 1

    Hi, I'm having a problem with using the multilingual keys - windows seems to handle AltGr the same way as ctrl-lalt. I tried using MS KLC 1.4, windows XP and the normal (not beta) colemak layout. Unfortunately, this seems to be a feature and not a bug (the checkbox says Alt+Ctrl (AltGr)). Is there any way I can convince windows to distinguish between AltGr and ctrl-lalt? I have a lot of shortcut keys mapped to ctrl-alt-something.

    Offline
    • 0
    • Shai
    • Administrator
    • Reputation: 36
    • Registered: 11-Dec-2005
    • Posts: 423

    As far as I know there's no way to do it. Most programs that use Alt-Ctrl mappings have some way to turn off that mapping. Google Desktop is one of the big offenders, but there's a way to disable Google Desktop's AltGr mapping.

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,364

    You might
    - remap the whole multilingual part (or whatever you need of it) to deadkeys instead - takes much less space (but it's clunkier)
    - use some script (e.g., a AutoHotKey or AutoIt one) that makes the distinction; I think that might be possible
    - rethink your shortcut key strategy to comply with Windows standards  :p

    Unfortunately, all of the above would require some work and knowhow.

    Last edited by DreymaR (07-Apr-2008 19:18:54)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,364

    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)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 1
    • Registered: 03-Apr-2008
    • Posts: 12

    I'm still confused. :-(

    This is something that worked a certain way before Colemak layout was installed. The Colemak layout changed it.

    Isn't a simpler solution to take the change out of the Colemak layout, rather than add another layer that changes the change?

    Thanks all!

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,364

    It's a simpler, but also a less advanced solution. Most of the world uses a different left and right Alt key (the RAlt becomes our AltGr) so we're able to type more advanced symbols and characters that our languages contain or just because it's nice to have, say, a £ or € or μ sign etc on our keyboard. So Shai chose to make Colemak a more internationally compatible layout and add symbols and characters (like æøåèąóñ...) from different languages. For people who need those, it's a huge boon.

    I've taken my AltGr key even further (and added in SGCaps and dead keys and whatnot too): With my own layout, I can type Greek, a whole slew of symbols, Cyrillic (albeit in a cumbersome way) and IPA phonetics. I can do that in almost any text editor (not just in MS Word by opening a tool and selecting characters by clicking there).

    You on the other hand, want to keep things simple. If you like, think of someone wanting to edit text in Notepad instead of Vim: It's much much simpler, a LOT easier to learn and all - but it just won't be as effective or powerful as a trained Vim user.

    So we who like the advanced way want to keep that. As I've said before, if someone want to remove the advanced stuff from the MSKLC file and recompile a Colemak install that's really up to them. But don't expect Shai to willingly jump to the extra hassle of maintaining multiple download versions (and the confusion it'll create among new users). If you still don't understand this you can read more about it on the FAQ pages.

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0