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

  • From: "rq" <trac@xxxxxxxxxxxx>
  • Date: Mon, 23 Aug 2010 18:01:26 -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 rq):

 Replying to [comment:11 pulkomandy]:
 > You are mixing things up.
 > Ok, so : AltGr should always be the 'option' key, that is, level-3
 > Alt is, in the default settings, a Command key. Coming from
 linux/windows, you may want to swap that with control. There is a button
 just for that in the Keymap preflet.

 OK, agreed.

 > Let's admit you do that. You get :
 >  * AltGr as the Option key : same as in Windows, acts as a level-3 shift
 >  * Alt key as control key : unused except in terminal
 >  * Both control key as Command key : trigger application shortcuts as in
 >  * Win key : doing different things, not particularly useful.

 This part about Both Control keys being the same is not exactly correct.
 Actually, right now the layout is like this:

 ||= Physical key =||= Left Ctrl =||= Left Win =||= Left Alt =||= Right
 Alt/AltGr =||= Right Win =||= Menu =||= Right Ctrl =||
 ||= Default mapping, US keymap =|| CTRL || OPT || CMD || CMD || OPT ||
 MENU || CTRL ||
 ||= Windows-like mapping, US keymap =|| CMD || OPT || CTRL || CTRL || OPT
 || MENU || CMD ||
 ||= Default mapping, French keymap =|| CTRL || OPT || CMD || OPT ||
 '''empty''' || MENU || CTRL ||
 ||= Windows-like mapping, French keymap =|| CMD || OPT || CTRL || OPT ||
 '''empty''' || MENU || CMD ||
 ||= Default mapping, Lithuanian keymap =|| CTRL || OPT || CMD || OPT ||
 '''empty''' || MENU || '''CMD''' ||
 ||= Windows-like mapping, Lithuanian keymap =|| CMD || OPT || CTRL || OPT
 || '''empty''' || MENU || '''CTRL''' ||

 You know, I just realised that not only Haiku's European layouts are
 different from US, but they are also inconsisten among themselves. That
 is, in your case both Control keys are indeed the same, but in my case,
 they are not. This fact is partly responsible for us not being able to
 reach at least some sort of an agreement. This should definately be fixed
 (along with empty assignments) in #6364.

 I was actually going to propose French-like mapping as at least a
 temporary solution, and now apparently, it simply exists.

 > Now, if you happen to :
 >  * Lack both win key (such keyboard exists) : you can still use Haiku

 Keyboards like that are really rare. I have no real figures but I would
 consider them pretty much exotic.

 >  * Lack an AltGr or othewise have a single Alt key (may happen, but
 didn't saw much of these) : you can still use Haiku

 Like I said, this had happened on Macs previously, but apart from that, I
 can't remember seeing a keyboard like that either. They probably don't
 even exist, because AltGr has been in use on PC's forever.

 >  * Have a single control key (Amiga and I believe Sun keyboards) : you
 can still use Haiku.

 Bah, and I never noticed that Sun keyboards lack a second Control. Well, I
 haven't used them much either. But I never suggested to give both Control
 keys different functions anyway.

 > Yes, it is a trick. Yes, it is not the good way to solve it. Yes, it is
 a waste of both win keys.

 > the proper fix is :
 >  * First, recognize there are different keys doing different things :
 currently we have Control (ctrl), Command (Alt), Option (AltGr), and we
 don't have any modifier that maps to Win.
 >  * Before introducing this new modifier (or compose or whatever), there
 is no need swapping the other keys around. Whatever you do, it will always
 feel illogical to someone.
 >  * Once the win key are assigned a meaning and use, they will stop
 duplicating the function of other keys, which is not what they should do.

 > You are both telling us to :
 >  * Forget about all keyboard legacy and ways of use from any operating
 system (having Alt and AltGr being different keys)
 >  * Forget about the way BeOS did it

 I strongly suggest at least the latter. BeOS was made for BeBox which had
 its own keyboard but is now dead. RIP. Now we have PC keyboards and they
 have slightly different from those of BeBox.

 >  * Also use something that is different from other OS (Alt and AltGr
 doing the same thing)
 > and then you complain about users getting lost ? Or maybe you don't, but
 others will. It's confusing.

 I would love to:
 * merge Cmd and Ctrl like it's done in Windows and Linux (give both
 functions to Ctrl key(s))
 * leave the function of AltGr to AltGr

 Then we would Left Alt and both Win keys free and we could have even two
 slots for functions. E.g., one (Win) could be used as system-wide Command
 key, and the other (Alt) as Mnemonic Access key or Compose or whatever
 else we may think is feasible.

 > I'm not opposed to changes, there IS something wrong, but don't try to
 replace a workaround with another and fix the real problem : we lack a
 modifier constant or some other use for the Win key.
 > Swapping Alt and LWin will make you happy, but prevent someone else to
 trigger any keyboard shortcut : problem not solved. I don't care, as I
 have an LWin key (but no RWin) on this laptop.

 I see not having Cmd and Ctrl on the same key as a real problem too. ;) As
 you know, I'd rather merge Alt(=Cmd) with Ctrl and give both functions to
 Ctrl key(s). This doesn't involve Win-key at all. On the contrary, this
 would automatically make Left Alt and Right Win (or both Alt's on US
 keyboards) free to use.

 > Look in the keymap preflet :
 >  * IBM Laptop : only one LWin key, no RWin
 >  * Typematrix : lacks RWin.

 My laptop doesn't have RWin too. But if both Win-keys had the same
 function (or had different functions that can be lived without), this
 wouldn't be a problem.

 >  * Kinesis : no win-key at all (and this is not a 15 year old keyboard).
 At least 3 of Haiku devs use this one. With mmu_man Model M, this makes 4
 angry devs.

 Actually, I googled for Kinesis, and found out that their newer models
 Keyboard2.jpg have Win-keys]. Also, Kinesis' description says that the
 keyboard allows for reprogramming keys, so I suspect that Kinesis may not
 be such a big deal in the end.

 Regarding mmu_man, his keyboard is 15-years old. Then again, some special
 mapping could probably be created (if needed) for keyboards without Win-

 So in the end, this doesn't necessarily make even one angry dev. ;)

 > Your "solution" just doesn't fit for some of these. It's not that it
 wouldn't work on a regular keyboard, it's that it will not work on
 something else. You can't rely on these win keys being there, and that's
 why they are put to functions we can live without :
 >  * duplicating other keys, or
 >  * Level3 shift for keyboards that don't need it.
 > As these keys are useless, yes, you are allowed to complain and tell
 they should be used more. They need their own modifier keycode ; and they
 should be useable on their own. But they will not have a nessential
 function, as some people just can't use them. A compose key or an user-
 magic-shortcut configurable key can fit. A vital function like Command

 I wouldn't mind them to become OS-wide command keys, probably not even
 reported to applications. After all, making them reported later is much
 less headache than making them no longer reported at some point.

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

Other related posts: