[0.16.50] AltGr keybinding acting totally weird

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

[0.16.50] AltGr keybinding acting totally weird

Post by SuperSandro2000 »

When I change a control to the AltGr key it only works if I press AltGr and then Ctrl or Alt in that order or if I press Alt and then Ctrl.

User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.16.50] AltGr keybinding acting totally weird

Post by mexmer »

What keyboard layout you use, some keyboard layouts treat altgrvdifferent 2ay (like prefix key), some make no difference between alt and altgr.

Also your os, and (if it’s linux), your window manager

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [0.16.50] AltGr keybinding acting totally weird

Post by SuperSandro2000 »

mexmer wrote:What keyboard layout you use, some keyboard layouts treat altgrvdifferent 2ay (like prefix key), some make no difference between alt and altgr.

Also your os, and (if it’s linux), your window manager
German keyboard layout Windows 10 and Ctrl + Alt should equal AltGr and not some weird combining of both.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.50] AltGr keybinding acting totally weird

Post by Rseding91 »

Thanks for the report. Input handling is changing in 0.17 with the re-work of the graphics backend so this may be solved for 0.17.

Regarding your current issue: can you verify that when you press the key on your keyboard it produces a distinct scan code over the left alt key?

If it's doing what I think it's doing then it's simply not going to work. That is: if it's not producing its own scan code and just sending shift + ctrl at the same time when pressed.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.50] AltGr keybinding acting totally weird

Post by eradicator »

Just for reference, on my german keyboard pressing e.g. AltGr+R produces (Windows 8):

Code: Select all

VK  SC	Type	Up/Dn	Elapsed	Key
-----------------------------------
#AltGr+R
A2  01D	 	d	0.56	LControl       	
A5  138	 	d	0.02	RAlt           	
52  013	 	d	0.09	R              	
52  013	 	u	0.16	R              	
A2  01D	 	u	0.06	LControl       	
A5  138	 	u	0.00	RAlt           	      	
#LControl+LAlt+R
A2  01D	 	d	0.44	LControl       	
A4  038	#	d	0.05	LAlt           	
52  013	 	d	0.38	R              	
A2  01D	 	u	0.19	LControl       	
A4  038	 	u	0.00	LAlt           	
52  013	 	u	0.00	R   
The keyboard has a seperate RControl, but no seperate RAlt key. If i assign the above to reverse-rotate it works fine in-game, but pressing LControl+LAlt+R (or RControl+LAlt+R) does too, so the game makes no differece between R/L variants?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.50] AltGr keybinding acting totally weird

Post by Rseding91 »

eradicator wrote:The keyboard has a seperate RControl, but no seperate RAlt key. If i assign the above to reverse-rotate it works fine in-game, but pressing LControl+LAlt+R (or RControl+LAlt+R) does too, so the game makes no differece between R/L variants?
Sounds plausable. The game makes no distinction between enter and numpad enter either because they're not useful distinctions to the game. I've personally never seen a keyboard with "AltGr" (all of my US keyboards just say "Alt" on both alt keys).

Possibly the only way to make this work for everyone is to add some option to make the game treat left/right variants of keys as distinct. First we would have to go through the code base and make sure everything that wanted to listen to "alt" listened to both or a specific one if it meant a specific one.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.50] AltGr keybinding acting totally weird

Post by eradicator »

Rseding91 wrote:I've personally never seen a keyboard with "AltGr" (all of my US keyboards just say "Alt" on both alt keys).
I don't think i've ever seen one without :D. Not inside of Germany anyway. (Due to that my muscle memory considers them inheritely different. I think shift is the only key i consider "the same" for R/L, but even RCtrl i don't consider "the same" as LCtrl and would thus never try to substitude one for the other when typing.)
According to wiki there's a few other countries (including US) that have layouts with AltGr https://en.wikipedia.org/wiki/AltGr#German. Out of curiosity: Do the RAlts on your keyboards actually only trigger RAlt, or does the keyboard driver make them into AltGr but you never noticed?
Rseding91 wrote: Possibly the only way to make this work for everyone is to add some option to make the game treat left/right variants of keys as distinct. First we would have to go through the code base and make sure everything that wanted to listen to "alt" listened to both or a specific one if it meant a specific one.
I wonder how other games handle that. My perception is too biased to tell if anyone would be bothered by RCtrl/RAlt being "different" keys.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2631
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [0.16.50] AltGr keybinding acting totally weird

Post by steinio »

In Farming Simulator the are different keys because you need a lot of them.
Image

Transport Belt Repair Man

View unread Posts

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [0.16.50] AltGr keybinding acting totally weird

Post by SuperSandro2000 »

Rseding91 wrote:
eradicator wrote:The keyboard has a seperate RControl, but no seperate RAlt key. If i assign the above to reverse-rotate it works fine in-game, but pressing LControl+LAlt+R (or RControl+LAlt+R) does too, so the game makes no differece between R/L variants?
Sounds plausable. The game makes no distinction between enter and numpad enter either because they're not useful distinctions to the game. I've personally never seen a keyboard with "AltGr" (all of my US keyboards just say "Alt" on both alt keys).

Possibly the only way to make this work for everyone is to add some option to make the game treat left/right variants of keys as distinct. First we would have to go through the code base and make sure everything that wanted to listen to "alt" listened to both or a specific one if it meant a specific one.
Most things I know even treat all numpad keys and both mirrored keys differently. I would suggest to differentiate all keys from one another.

Post Reply

Return to “Minor issues”