#6442: AltGr should have a separate keycode -------------------------------+-------------------------------------------- Reporter: rq | Owner: pulkomandy Type: enhancement | Status: assigned Priority: normal | Milestone: R1 Component: Drivers/Keyboard | Version: Resolution: | Keywords: Blocked By: | Has a Patch: 0 Platform: All | Blocking: -------------------------------+-------------------------------------------- Comment (by rq): Replying to [comment:3 siarzhuk]: > Replying to [ticket:6442 rq]: > > Currently, the Opt key maps to two different PC keys: Alt and AltGr. > > Have you mistyped here and meant Win and AltGr keys? Because Alt key has Command assignment by default and AltGr is a typical way to enter Optional layer in the european keymaps. By the way, I think that this "Win => Opt" assignment has occured during porting BeOS from PPC to x86 platform. I didn't mistype. I meant the OPT function. I should've been clearer about that. However, the way those assigments are shuffled right now is IMO ugly and undesirable. That's what #6364 is about. > > This is similar to Macs and same as original BeOS, but it could probably be better if these two functions were actually separated. AltGr function (which is actually just a Level 3 Shift) should probably have a separate keycode. > > In my opinion the Win key is the first candidate for separate keycode in such case. But I do not understand which profit do you get from this? Additional Win-layer in keymap? :-D The short answer is: I don't care at all about additional layers on the keyboard. IMO, two modifiers – Shift and AltGr – are enough for most if not all cases, or at least that's the most common scenario. I don't know what else OPT key does apart from adding additional keymap layer and modifying keyboard shortcuts. If these are all the functions is has, then yes, maybe it's not so useful to separate them. The long and much broader (to the extent that it could be considered offtopic) answer follows... I'm not sure about what other functions than providing additional layer the Opt key has in BeOS/Haiku. If that is all it does, then perhaps it's OK to keep this as is. However, this solution should not be made in a vacuum. Since we have a limited number of keys, we have to see all the distinct functions that the function keys perform, because we will have to combine them (assign more than one function to the same key). The most common functions I could think of are: ||= =||||||= Key =|| ||= Function =||= Windows/Linux =||= Mac =||= Haiku* =|| || App Command || Ctrl || Cmd || CMD || || Control || Ctrl || Ctrl || CTRL || || Option || Alt || Opt || OPT || || Mnemonic Access || Alt || - || - || || Level 3 Shift || AltGr || Opt || OPT || || OS Command || Win/- || Cmd || - || || OS Menu || Win/- || - || Menu || || Context Menu || Menu || - || - || Note: to avoid a mess (#6364), in Haiku column I used key names as shown in the screenshot, not the actual names on keyboard. I think the key to a good solution here is to actually decide which of these functions we want to use, which ones we are using and which ones we don't care about. Also, different functions should be combined in a sane manner, so that they clash as rarely as possible. Here's a table of functions that I think could coexist on the same key. Letters W,L,M,H mean that the combination is already used in Windows, Linux, Mac, and/or BeOS/Haiku: || || App Command || Control || Option || Mnemonic Access || Level 3 Shift || OS Command || OS Menu || Context Menu || || App Command || || W,L || || || || v || || || || Control || W,L || || v || v || || || || v || || Option || || v || || W,L || M,H || || v || v || || Mnemonic Access || || v || W,L || || || || || v || || Level 3 Shift || || || M,H || || || || || || || OS Command || v || || || || || || W || v || || OS Menu || || || v || || || W || || || || Context Menu || || v || v || v || || v || || || Note: this table is based on assumption that Control is only useful in Terminal, and Option only modifies keyboard shortcuts. Another note: I separated OS Command from App Command keys, like it's done in Windows. I personally like that because it means the OS can introduce new global keyboard shortcuts without affecting applications. E.g. Win+F fires up a global Search dialog in Windows, while Ctrl+F usually fires the application's Find dialog. OTOH, if there's a really small number of OS commands, then maybe Fx are the right keys to use for them (like in OS X), and a separate OS Command key is not needed. I also don't know if such thing currently exists in Linux or Haiku. The goal would be to have no more than one H in each row and column. As a "frequent flyer" between Windows, Linux and Mac, I would see another goal: consistency with other operating systems. We should not assume that Haiku is the only OS the user uses, so not punishing them for having some muscular memory is a good thing. In that regard, Mac and Haiku aren't really friendly to Windows and Linux users ATM. And since Windows is currently the dominant OS, I'd rather be consistent with Windows than with Mac. Also, just by looking at first table, it's pretty obvious that Windows is the only OS currently providing all of the listed commands, and that Linux is mostly consistent with Windows in this regard. Windows and Linux combine App Command and Control onto the same key. I think it makes perfect sense to do so, because Terminal is usually quite an ascetic application with just a few commands in need of a shortcut key, so Terminal could simply be an exception from the usual keyboard shortcut consistency rule and use slightly different shortcuts (as is done with Gnome terminal - it simply assigns Ctrl+Shift+key to functions where Ctrl+key is the usual combo). Futhermore, Terminal is usually a power-user application, so we can expect them to know that Copy is not CMD+C in Terminal. I wrote so much stuff here that I forgot my initial idea. However the bottom line is this: At most, we only have 7 keys that we can use for all those (and maybe even more) functions, so we will have to combine these functions. And I'd rather see them combined in the same way they are in other popular operating systems than in some other way unless that other way is considered better (and not just for legacy reasons). It seems like Windows alone currently has 90% of the OS market share, so I'd rather see Haiku pleasing Windows than Mac users' muscular memory. Pulkomandy, I guess you should not introduce any new keycodes until we have clear answers to the questions above. -- Ticket URL: <http://dev.haiku-os.org/ticket/6442#comment:4> Haiku <http://dev.haiku-os.org> Haiku - the operating system.