Personal computing discussed

Moderators: renee, Flying Fox, Ryu Connor

 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Remap AltGr to Alt (Windows)?

Thu Oct 26, 2017 10:13 am

Any idea how to remap AltGr to Alt?
(I'm not sure, is AltGr actually composed of two key presses?)

I wasn't able to find an AltGr scan code that works in:
HKLM\System\CurrentControlSet\Control\Keyboard Layout\Scancode Map

Key remapping utilities either don't list AltGr, or don't seem to handle it correctly.
 
UberGerbil
Grand Admiral Gerbil
Posts: 10368
Joined: Thu Jun 19, 2003 3:11 pm

Re: Remap AltGr to Alt (Windows)?

Thu Oct 26, 2017 12:41 pm

 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: Remap AltGr to Alt (Windows)?

Thu Oct 26, 2017 1:43 pm

The registry remap mentioned there didn't work before, but I'll try again (though I'm pretty sure I restarted the last time). And I don't want to run a background utility for that.

I'm thinking, maybe create a custom keyboard layout DLL.

The only free tool I know of right now is MS's Keyboard Layout Creator, which won't let me do what I want. I do want some Ctrl-Alt mode keycodes, but not RAlt turning into AltGr. In MSKLC they're linked together. There's a checkbox to turn RAlt to AltGr, but it's greyed out if there are any keycodes set for the Ctrl-Alt mode. I'm not sure if they must be tied together; if they are, why have the checkbox in the GUI at all?

Maybe I should try to figure out where to change the bit flag (fLocaleFlags |= KLLF_ALTGR) in an existing Microsoft layout DLL.

Odd tidbit: MSKLC creates separate layout DLLs for i386 and wow64 (in addition to amd64).
 
whm1974
Emperor Gerbilius I
Posts: 6361
Joined: Fri Dec 05, 2014 5:29 am

Re: Remap AltGr to Alt (Windows)?

Thu Oct 26, 2017 6:54 pm

I have to ask, but is AltGr? I have never used it before and what does it do?
 
Redocbew
Minister of Gerbil Affairs
Posts: 2495
Joined: Sat Mar 15, 2014 11:44 am

Re: Remap AltGr to Alt (Windows)?

Thu Oct 26, 2017 7:07 pm

So says wikipedia.

https://en.wikipedia.org/wiki/AltGr_key

I've never used a keyboard with one of these keys before, but I guess that's not surprising considering its use.
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
whm1974
Emperor Gerbilius I
Posts: 6361
Joined: Fri Dec 05, 2014 5:29 am

Re: Remap AltGr to Alt (Windows)?

Thu Oct 26, 2017 7:59 pm

Redocbew wrote:
So says wikipedia.

https://en.wikipedia.org/wiki/AltGr_key

I've never used a keyboard with one of these keys before, but I guess that's not surprising considering its use.

I've only heard of it being on UNIX Workstation keyboards. Although from reading the Wikipedia article, I seen it is also on the US international layout as well.
 
SuperSpy
Minister of Gerbil Affairs
Posts: 2403
Joined: Thu Sep 12, 2002 9:34 pm
Location: TR Forums

Re: Remap AltGr to Alt (Windows)?

Fri Oct 27, 2017 7:08 am

My Acer Aspire laptop has an AltGr key, but it's apparently already been remapped to Alt, because on this machine the two keys have always functioned identically.
Desktop: i7-4790K @4.8 GHz | 32 GB | EVGA Gefore 1060 | Windows 10 x64
Laptop: MacBook Pro 2017 2.9GHz | 16 GB | Radeon Pro 560
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: Remap AltGr to Alt (Windows)?

Fri Oct 27, 2017 8:39 am

I don't have AltGr written on the physical key. It's a function of the selected keyboard layout in Windows.
 
ludi
Lord High Gerbil
Posts: 8646
Joined: Fri Jun 21, 2002 10:47 pm
Location: Sunny Colorado front range

Re: Remap AltGr to Alt (Windows)?

Fri Oct 27, 2017 10:42 am

SuperSpy wrote:
My Acer Aspire laptop has an AltGr key, but it's apparently already been remapped to Alt, because on this machine the two keys have always functioned identically.

Did you set up Windows with an "English (US)" keyboard layout? That probably did it.
Abacus Model 2.5 | Quad-Row FX with 256 Cherry Red Slider Beads | Applewood Frame | Water Cooling by Brita Filtration
 
EndlessWaves
Gerbil Team Leader
Posts: 262
Joined: Fri Jul 10, 2009 10:41 am

Re: Remap AltGr to Alt (Windows)?

Fri Oct 27, 2017 11:26 am

AltGr is ubiquitous on European keyboards, even the UK has it although it's generally only used for the €.

SharpKeys isn't a background utility by the way, it's purely a convenience tool for setting registry values. It's well worth a go.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: Remap AltGr to Alt (Windows)?

Sat Oct 28, 2017 7:53 am

UberGerbil wrote:

Tried the remap again, it actually does work. I must've tried another scancode suggestion from another StackOverflow question.

The thing that works is just an RAlt to LAlt remap, which apparently also affects its AltGr-ness. I do wonder if there are cases where one would want the L/R distinction (without it being AltGr), but for now it'll do.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,38,00,38,e0,00,00,00,00


EndlessWaves wrote:
SharpKeys isn't a background utility by the way, it's purely a convenience tool for setting registry values. It's well worth a go.

I was talking about AHK. SharpKeys doesn't have AltGr listed, nor does it detect Alt presses for scancode detection. But for the above RAlt->LAlt remap it's fine.

Who is online

Users browsing this forum: No registered users and 35 guests
GZIP: On