Page MenuHome

ALT and ALT GR are not the same in Spanish Spain keyboard distribution
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 560 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 388.13

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e
Worked: (optional)

Short description of error
In english keyboard distribution, ALT and ALT GR is the same key, for example, ALT+M to Merge is the same for the ALT GR+M, so much comfortable to use with the left hand, but if I change they Windows key distribution to Spanish (Espanol Espana) ALT GR + M won't work, only works ALT + M, and If I change into Blender preferences the keymap for ALT + M to ALT GR + M, it works, but it shows as CTRL + ALT + M and left ALT + M won't work again only works ALT GR + M.

I'm working with Spanish key combination in windows 10

Exact steps for others to reproduce the error
Using Spanish Spain Windows keyboard distribution, select 2 vertices in edit mode, press ALT GR + M, it won't work, go to Preferences, Keymap, search for ALT M Key-Binding and change Merge under Mesh to ALT GR + M.

It will work, but ALT + M won't work again and in keymap will show as CTRL + ALT + M.

Details

Type
Bug

Event Timeline

From what I understand is that you describe a few different things at the same time.

  1. Spanish keyboards have ALT and ALT GR keys, and Blender treats those as different modifier keys.
  2. When a shortcut is bound to use ALT GR, Blender still shows it as using ALT.

IMO this is indeed problematic. Blender should either treat ALT GR and ALT as the same modifier key (in which case 1. is the bug and 2. is fine), or treat those two keys as separate (in which case 1. is fine and 2. is the bug).

Please correct me if I'm not understanding this correctly, and confirm where I'm right. I can't investigate this myself as I don't have a keyboard with ALT GR key.

Ricardo (INeedMana) added a comment.EditedTue, Aug 6, 9:30 PM

You are correct in point 1, but not in point 2.

  1. When a shortcut is bound to use ALT GR, Blender shows it as using CTRL + ALT + key:

This image shows what happens if I change ALT+M to ALT GR + M:

Of course, in any moment I press CTRL key when binding ALT GR + M.

Either way, after showing as CTRL + ALT keys, I can use both ALT GR + M, or CTRL + ALT + M, both works.

On Windows Ctrl+Alt and AltGr are equivalents,
and it is recommended that this combination not be used as a modifier.

So strictly speaking, there's no bug.

https://en.wikipedia.org/wiki/AltGr_key#Control_+_Alt_as_a_substitute
https://devblogs.microsoft.com/oldnewthing/20040329-00/?p=40003
https://github.com/Microsoft/vscode/issues/50341

continuing T68485

Windows7 machine:

wm_event_do_handlers: Handling event
wmEvent  type:214 / RIGHT_ALT, val:1 / PRESS,
         shift:0, ctrl:0, alt:1, oskey:0, keymodifier:0,
         mouse:(367,886), ascii:' ', utf8:'', keymap_idname:(null), pointer:000000000EA0F538

wm_event_do_handlers: Handling event
wmEvent  type:214 / RIGHT_ALT, val:2 / RELEASE,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
         mouse:(367,886), ascii:' ', utf8:'', keymap_idname:(null), pointer:000000000EA0F538

Windows10 machine:

wm_event_do_handlers: Handling event
wmEvent  type:215 / RIGHT_CTRL, val:1 / PRESS,
         shift:0, ctrl:1, alt:0, oskey:0, keymodifier:0,
         mouse:(296,1231), ascii:' ', utf8:'', keymap_idname:(null), pointer:00000173F70B0768

wm_event_do_handlers: Handling event
wmEvent  type:214 / RIGHT_ALT, val:1 / PRESS,
         shift:0, ctrl:1, alt:3, oskey:0, keymodifier:0,
         mouse:(296,1231), ascii:' ', utf8:'', keymap_idname:(null), pointer:00000173F70AF8C8

wm_event_do_handlers: Handling event
wmEvent  type:215 / RIGHT_CTRL, val:2 / RELEASE,
         shift:0, ctrl:0, alt:3, oskey:0, keymodifier:0,
         mouse:(296,1231), ascii:' ', utf8:'', keymap_idname:(null), pointer:00000173F70B0768

wm_event_do_handlers: Handling event
wmEvent  type:214 / RIGHT_ALT, val:2 / RELEASE,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
         mouse:(296,1231), ascii:' ', utf8:'', keymap_idname:(null), pointer:00000173F70AF8C8

In both system i'm using same layout that utilities AltGr as modifier to type "ęąó" and so on
Blender does recognize AltGr, but aparently not in all cases. So its half working feature. Imo this is a bug.

https://developer.blender.org/rBACc52e7c13706e96816f5f8893349d602803948ae2
There was fix for that, but for some reason it is not working for us.

There is "The keyboard driver in Windows sends left control events when AltGr is pressed."
And i guess win10 driver is sending right control instead of left one, and that fix dont work in this case.