Option/Command/Alt Confusion

Well, nothing is confusing if there is enough visual help to inform users. Windows/Linux mode is a significant pattern change, therefore a confirmation step should be required, with the necessary information.

IMO, Windows/Linux mode should be either phased out, or hidden under a menu item, instead of a giant button poking at our faces. No other operating system has such a thing that accommodates other OS.

MacOS:

image

GNOME (OK, it is in gnome-tweaks):

KDE Plasma:

Windows:

EMACS:

That’s a lot of screenshots of things that don’t exist in any operating system, don’t you think?

2 Likes

I don’t understand, Haiku already allows changing key mappings (in another dialogue), so do other operating systems. So, what’s the point of having a dedicated button that explicitly says “Windows/Linux mode”?

I appreciate that you took a lot of effort for the screenshots, but it does not explain anything (other than offering snarky remarks).

All operating systems have this problem and need to solve it.

I don’t understand what you mean by “in another dialogue”, the button is in the keymap configuration which is the place where you could also do it manually (by dragging and dropping the buttons around, both on the left and right of the keyboard, which is a somewhat confusing process especially if you don’t know what “command” and “option” and “control” mean).

The Windows/Linux mode is fully supported and should be easy to set up. We don’t plan to give up on it. You set bold claims of “No other operating system has such a thing that accommodates other OS”, which is biasing the discussion with fake arguments. Every Os has a way to do this, some like MacOS where it is very easy, and some like GNOME or Windows where it is an internal setting, but still possible to change. This shows that there is demand for this, in all operating systems, and that explains why we have a button to do it.

Yes, it does introduce some complexity and we try to avoid that whenever possible. But in this case, there are valid arguments in both directions:

  • For the “Apple” mode: it is what BeOS did by default and it is better ergonomics
  • For the “windows” mode: Windows and Linux do this, and some people run them in dualboot or run Haiku in a VM, and in that case, the effort to “context switch” between the two modes completely cancels the gains from the better ergonomics

That’s why we decided to allow both modes and added a button to easily switch between them. I don’t think we should revisit that decision.

3 Likes

The “Switch shortcut keys to Windows/Linux mode” button was added to ease the transition of people coming from Windows that think Haiku’s shortcuts are strange, that’s why it has such a prominent place in the Keymap preferences. Long ago I tried to update this to a drop down and include a “Switch shortcut keys to Mac mode” and was told that we don’t want to alter that button, so I went another way and implemented a more general Modifier keys window. However that button remains forever more as a crutch for people who just cannot live with Alt instead of Ctrl as their main shortcut key.

Keymap → File → Set Modifier Keys. It’s literally the same dialogue as in macOS.

No other operating system has a preset that allows changing the mappings identical to other operating systems. Does any Linux DE have a macOS mode or vice versa? Windows? Don’t think so. Correct me if I’m wrong.

No one is advocating disabling the ability to allow changing modifier key mappings. It seems to me that you are trying to muddy the argument clinging to wordings.

@jscipione, I am aware that it is for convenience, but it just offers more confusion, as seen in this thread. It implies something more than it really is. People can change the modifier keys, and the menu labels normally should not be a concern. If I understand right, it’s been suggested, that Windows/Linux mode should alter the menu shortcut key labels as well, which is something that should not happen.

1 Like

Why should that not happen? It only makes sense that if you change your shortcut key, you change the shortcut label in the menu as well.

1 Like

I think the process should be like this:

Let’s say the shortcut is Command+S (Alt+S). If we swap the Command Key with Control Key, the shortcut physically becomes Control+S, but the key role is still Command+S. By default, we assume the key labels are Control, Option, Command respectively, if we manually swap the roles of Command and Control, the physical location is indeed different but the key role is the same. That’s why there should be no need to update the menu shortcut label. The user knows that he/she switched the location, that should be sufficient.

Yes and this is no accident. It’s supposed to be an easier way to change modifier keys for people that don’t understand the key roles or get them so messed up that they need help putting them back to default.

In 2005 when Apple released the Mac mini they included that dialog in Mac OS X because the machine was “BYOKMD” i.e. bring your own keyboard, mouse and display which was a phrase that was probably only ever really used by one man: Steve Jobs. Apple had to come up with a way to connect PC keyboards to a Mac for the first time and they found that they had the same problem we have, which is that there’s no good way to detect the keyboard with modifier keys swapped on a PC keyboard compared to a Mac keyboard so the user unfortunately has to do that work themselves.

The menus always show the physical key (not the role). So in default mode they currently show Alt and in “Windows” mode they show Ctrl. This was already the case in BeOS and is the case also in Haiku.

No one is advocating disabling the ability to allow changing modifier key mappings. It seems to me that you are trying to muddy the argument clinging to wordings.

It was just a misunderstanding. I was confused and so I said confusing things. I was not aware of the options in the “File” menu.

So, yes, the other OS don’t want to name their competitors. I think we’re fine with that.

You are also correct that the “Windows” mode is not quite identical to Windows. The main shortcuts are with the Ctrl key, but, for example, Ctrl+C in Terminal won’t work as in Windows. But, is that really the part that’s confusing here? I don’t think I saw anyone complain about this specific problem. We have bigger issues to fix, I think?

The button is nice because it provides a standard setup for the keys that we can still provide support for. If the official way to do things is “figure out the settings for each key on your own, and if youget it wrong, no one will be able to help you because no one knows how you have configured them”, this is not a great solution. That’s why there is a simple button to switch between two officially supported settings. I am fine with rewording it if people think calling the modes “Apple” and “Windows” is too confusing.

There is, we can easily get the USB vendor ID from the keyboard and know if it is an Apple one. And we can probably add a few vendor/device IDs for other manufacturers who may have built Apple-style keyboards. Someone just has to write the code to do that.

However, it will solve the other issue. On Mac keyboards, the OPTION and COMMAND keys are physically swapped. But our button is to switch the CONTROL and COMMAND keys. Which means there are actually 4 possible cases:

  • Using Apple style shortcuts with an Apple keyboard
  • Using Apple style shortcuts with a PC keyboard
  • Using Windows style shortcuts with an Apple keyboard
  • Using Windows style shortcuts with a PC keyboard

I think we should solve the Apple vs PC layouts at a level below the keymap. The unmapped keycodes should always be in the order defined in the Be Book and Haiku Book: The Haiku Book: Keyboard

  • Leftmost key is 0x55
  • Second key is 0x66
  • Third key is 0x5d

This could be handled by the input_server, for example. Once we have this sane base of knowing where the key that the user pressed is located, we can build the upper layers on top of that sane fundation.

2 Likes

Yes ok, we get it, you want to put the role instead of the key in the menu, and you’re not alone in this (X512 said the same thing, as have others), but I still think that will only add to the confusion. I may get outvoted here but hey, then my Mac keyboard will finally match the menu labels since our roles are identical to Mac keyboard modifiers which works for me even if it does anger some PC keyboard users.

It seems to me we could simply add more keymaps for the extra possibilities. Since you are expected to select the keymap on the first boot prompt anyway we could add a keymap for US-English (Mac) that switched the modifier keys for you. We could even look for … (Mac) at the end of your keymap and if present we use Mac keyboard menu shortcuts otherwise present the PC ones. That’s a little hacky sure, but it would allow us to get the feature we want without having to update the keymap definitions, and that’s something we would really prefer not to do unless we can do it right (by adding all the new features we want and versioning it).

What about Bluetooth keyboards? What about if you have multiple keyboards connected, one Mac and one PC? If we really could have a simple input filter that detects a Mac keyboard by its USB Vendor and Device ID and swaps the modifier keys that would be great. It seems like we could pretty easily identify any first party Apple keyboard but Macally, Logitech, and other third party Mac keyboards would be tougher.

On Bluetooth you can still know the keyboard manufacturer, for example by using its Bluetooth MAC address. But that’s a problem for when we support Bluetooth.

If we do the swapping in input server or in USB HID drivers, we can do it only for the affected keyboards.

I hope they would still have different device IDs than their PC equivalents? If that’s the case, we can detect that.

I will try to have a look into this, at least we can solve the hardware swapping of option and cmd keys which will remove some of the confusion already. And once we have the vendor/device info, we should also be able to show the correct layout in Keymap preferences by default and switch the menus to using Command and Option modifiers in this case.

This thread is too long.

On sun keyboards the super key has a diamond on it.

I believe there is another potential issue with doing it like that. Virtual machines AFAIK emulate a PS/2 keyboard, so someone running Haiku VM on a Mac host would still hava swapped keys as there would be no way to detect it.

IMHO if the swapping is to be done at a low level, Haiku should just let the user toggle it instead of trying to be smart at first, or at least allow a manual override.

1 Like

None of them mention some modes that mention foreign OS names.

1 Like

Without trying to contradict you, the windows key also issues commands. Windows + L locks your screen. Windows + shift + S now initiates the screen capture under latest Windows 10. There are more, but I personally use those 2 on a daily basis multiple times. If you momentarily press Windows key it brings up the start menu yes, but in combination with other keys it is a modifier like the Mac Command key too.

1 Like

I am a long time BeOS user and also mostly used it under PowerPC. For me, the only mapping is the equivalent of the Mac layout because that was the default in BeOS. Having the alt key be Command is almost as bad as a Mac keyboard in Windows mapping the option key wrongly (which I believe is does if you plug a Mac usb keyboard in to a PC, option and command are reversed.) As long as I can map the keyboard to use the Mac schema in Haiku with a PC keyboard (control is control, alt is option and windows is command) I really don’t care if it is default or not. I would just like that option to be supported.

3 Likes

Windows maps the Mac keys as what are printed on the keys, meaning ALT/OPTION is mapped as ALT and COMMAND is mapped as WIN.

That is the correct mapping; the keys are mapped as intended by the keyboard manufacturer.

2 Likes

Yeah and I just discovered MacOS does the same, so Windows is Command and alt is option. That is confusing if you are not familiar with that nuance. (And by “confusing” I mean, your muscle memory is completely thrown off.)

I always reman Alt to Command and Win to Alt if I use a PC keyboard on a Mac for any time.

Anything that goes against what you have previously learnt can be confusing, but it does not mean that it is wrong.