The online racing simulator
Alt Gr != Ctrl
(7 posts, started )
Alt Gr != Ctrl
This is a fairly minor bug, but it's been bugging me recently (no pun intended).

The "Alt Gr" key seems to be interpreted by lfs as Ctrl instead of Alt. When I try to use the Alt Gr key to do the Alt + F7-12 binds with one hand, LFS runs the Ctrl + F equivalent.
#2 - delis
the same to me
Don't you have a normal Alt key??
Alt and Alt Gr(aph) do different things themself...

e.g
Alt can be used for special 3, 4 code characters from the num pad like ALT 8879 making this »

Alt Gr doesn't, Instead Alt Gr can be used to make charachters like á é í ó ú by holding "Alt Gr" and pressing a e i o u

Maybe LFS seeing it as a CTRL is becuase its really not the same as a normal "Alt" Key??
I think AltGr is usually interpreted as Ctrl + Alt, at least on the special "tertiary" characters on the keyboard like @€²³µ~{[]}\| all work with both Ctrl + Alt or just AltGr alone. In any case, AltGr should either not do anything at all or be its own key, since interpreting it as Alt is equally wrong to interpreting it as Ctrl.

E: Funnily enough, á é í ó ú cannot be created via AltGr on a German keyboard layout. Instead you have to use the sort of "prefix" key (in this case to the left of the backspace key) which in itself doesn't print anything and then afterwards type one of the normal letters. Pressing the "prefix" key and space will instead just print the character alone. So like "´ " results in "´" and "´a" results in "á"
If the Alt Gr key is conveniently pressing both Ctrl and Alt for the user it is the way LFS works. It checks if Ctrl is down, if so it does those special lines of code. If not it proceeds to check if Alt is down... Since the Alt Gr key is simulating presses for both Ctrl and Alt it will run the Ctrl code.

I repeat a question from above; do you not have a normal Alt key on the keyboard?
It isn't the same though, since AltGr + Del does not equal Ctrl + Alt + Del!
Quote from DavidTiger :Don't you have a normal Alt key??

Yes, but with one hand I can only get to F9 at a stretch and only F8 if I use my left hand. When driving with anything other than keyboard, taking both hands off the controller is very likely to cause unwanted steering input.


I hadn't considered the repercussions of simply making Alt Gr = Alt, but it does seem wrong that it gets interpreted as Ctrl rather than either Alt or nothing when used with F keys. When used with a standard letter that doesn't have an option for the modifier, it often doesn't do anything at all (text input on some other apps).

Many other programs, particularly games, interpret the Alt Gr key as a kind of 'Right Alt' which can vary its use depending on the key combination. I'm not sure what interpretation would be best for LFS, or even if it's worth changing, but having Alt Gr + F* do nothing or assume Alt + F* would be more logical than pressing the Ctrl + equivalent.

Alt Gr != Ctrl
(7 posts, started )
FGED GREDG RDFGDR GSFDG