[haiku-bugs] Re: [Haiku] #6442: AltGr should have a separate keycode

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Mon, 23 Aug 2010 07:18:12 -0000

#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 pulkomandy):

 I agree that AltGr and Win should not be the same modifier, but Alt and
 AltGr should not either. That's why it is impossible to fix #6364 without
 introducing something else.
 The question here is not directly what this key should be used for, but
 how, API-Wise, it should be reported to applications. Possible answers are
 :
  * Not reported at all : the key would only be used by the OS. No API
 change.
  * Reported as a modifier : the key can be used by everyone. API change as
 the modifier status will have more defined bits. It can act as a shortcut
 modifier, a level-4 key, or anything else. Needs a change to the keymap
 format if we go level-4, and also makes way too much symbols on each key
  * Reported as a regular key like q,w,e : not sure what that would be
 useful for
  * Not reported, used as a compose key : no API change, works like a
 special dead key.

 These 4 solutions require different code, but all solve this issue. I
 don't care about how the "new" key is used, but only the fact it can be
 reported to someone.

 If we fix #6364 now, it would lead to :
  * both CTRL keys > Control
  * both Win keys > Option
  * left alt key > Command
  * AltGr (right alt) key > Option
  * Menu key > Menu
 This is somewhat better than the current scheme, but leads to 3 keys
 (winL, winR, altGr) doing the same.
 Now what to do with that : on AZERTY keyboards people will use AltGr as
 Option, so they'd want Win to be the key doing 'something else'. On US-
 QWERTY, there is no AltGr key so I think people actually use Win as
 Option. They would want AltGr to do 'something else', and have this
 'something else' not mapped on their keyboard.

 The problem with all that is the AltGr key is not present on all
 keyboards, so you can't assign it a meaning that's vital to the use of the
 system. Some time ago it was also the case of the Win key. This likely
 explains why they share the same non-vital function, in the hope that
 every keyboard would have at least one of them. Now, time passed and it
 would likely be ok to rely on Win-key always being present. Can US guys
 live without level-3 shift ? Likely : the American keymap don't even use
 it. Is it ok for all countries ? I think so : the one that need it do have
 the altGr key.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6442#comment:7>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: