On Tue, Nov 8, 2011 at 1:24 PM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote: > On 11/08/2011 06:25 PM, John Scipione wrote: > >> Thank you, I finally understand what Axel and Ingo an humdinger are >> talking about now. It took me so long to get it because it is such a >> stupendously terrible idea that my brain would not allow me to believe >> that is what they were actually saying. >> > > Heh ;-) > > > The key roles idea is the exact opposite of what I am advocating, >> divorcing the menu bitmaps from the physical key and instead tying it to >> the "role" of the key. I get it now. >> > > Exactly. I would like your approach if it would actually be an > approachable goal. Unfortunately, it isn't; you cannot make it work > correctly, as you don't have enough information about the attached > keyboards (oh yes, there can even be more than one - and in the future, you > should also be able to configure them differently). > Moving this over to dev since it is getting a little off topic for the ticket. I've thought about it a bit more, and, well, we are both right. What I am advocating can never work because there are just too many keyboard variations and there are other issues as well. What you and others are advocating has issues too putting a level of indirection in where there should be none, the menus. I've come up with a fair compromise on how to make this work for most everybody. First off, we go with the key roles idea. Meaning, B_COMMAND_KEY always gets the same bitmap, B_OPTION_KEY gets a bitmap, B_CONTROL_KEY gets a bitmap, and B_SHIFT_KEY gets a bitmap. If you flip the role of the keys in Keymap the bitmaps don't change, the menu always shows the key function. The code for this is simple, the change would take maybe 1 hour. Then we make 3 key "modes" to pick which bitmap gets displayed in the menu. Mode 1 is the default for Haiku on PC keyboards, B_CONTROL_KEY = "CTRL", B_OPTION_KEY = "WIN", B_COMMAND_KEY = "ALT". Mode 2 is for Windows users flipping the B_CONTROL_KEY and B_COMMAND_KEY bitmaps. B_CONTROL_KEY = "CMD", B_OPTION_KEY = "WIN", B_COMMAND_KEY = "CTRL". This mode gets activated when you push the "Switch modifier keys to Windows/Linux mode" button in Keymaps and is a hack to not further confuse already confused Windows refugees by putting "ALT" in the menu when they are suppose to hit Control. Mode 3 is for people using Mac keyboards B_CONTROL_KEY = "CTRL", B_OPTION_KEY = "OPT", B_COMMAND_KEY = "CMD". Mode 3 gets activated when you set a "... (Mac)" keymap in the Keymaps Preferences or perhaps when a Mac keyboard is detected by input_server (code yet to be written for this). So that is a total of 6 bitmaps needed. "SHIFT", "CTRL", "ALT", "WIN", "OPT", and "CMD". Out of the 6, 4 are used at any time. These 3 modes cover pretty much all the cases that I want to support, everything else is gravy. In this scheme if you were to flip control and caps lock the menu would still say "CTRL" since that is what your key mode tells it, and that is what I'd expect. I think this compromise takes from the best of both worlds. Thanks, John Scipione