This is a discussion I’d like to have surrounding Keyboard Shortcuts…
See the following PR (WebPositive: Change back and forward shortcuts to Ctrl+left and right
) for context: https://review.haiku-os.org/c/haiku/+/7290 with a touch of (BTextView: Update word-wise/line-wise shortcuts
) for additional context: https://review.haiku-os.org/c/haiku/+/7289/23
The idea here is define a standard for how Haiku does Shortcuts. Skipping to the end I propose that Haiku follows the convention of using Shortcuts like Windows does but with Ctrl and Alt swapped.
A little history here as background: when BeOS started out it ran on the BeBox which used a standard PC keyboard then they switched to PPC Macs which used a command key and then they switched back to Intel PCs but with an Alt key and a Windows key.
When BeOS switched from PPC Macs to x86 PCs they decided to use Alt instead of Ctrl as the main shortcut key since it emulated the position of the Command key on a Mac keyboard and that has continued this way in Haiku to this day.
While this solution mostly solved the problem for those used to Mac keyboards, it didn’t solve the problem of people coming from Windows or Linux and are used to how keyboards work on those OSs. For those users Be added a “Switch to Windows/Linux mode button” in Keymap Preferences which swapped Ctrl and Alt around so that the keys would then behave how those users expected them to from Windows.
These shortcuts effect 3 major areas:
- Navigation in text boxes
- Terminal Commands
- Twitcher and Back and forth in browser
For navigation in text boxes you use Alt to navigate line-wise, and option/Windows key to navigate word-wise. You can switch Windows/Linux mode and that makes Ctrl do line-wise navigation instead of Alt. Some people don’t want to use Windows/Linux mode but still want to use Ctrl for line-wise navigation, so what I’ve done in PR 7289 above is to make both Ctrl and Alt do line-wise navigation while Option/Windows key does word-wise as long as there’s not a conflict.
For Terminal we use Alt+C for copy which is great because otherwise it would conflict with Ctrl+C to signal an interrupt. If you switch to Haiku/Linux mode you use Ctrl+C to copy but now you have to use Alt+C signal an interrupt instead which is a bit strange shrug.
The last case is Twitcher and Back and Forward in Browsers. These two actions uniquely use Alt instead of Ctrl on Windows so the idea here is we swap that and use Ctrl instead of Alt. So that activates Twitcher on Ctrl+Tab which is exactly what we are currently doing in Haiku and inherited from BeOS. The commit that triggered this whole discussion was that I also made the Back and Forward shortcuts in WebPositive swap Alt for Ctrl following the pattern of Windows with Ctrl and Alt swapped. The idea here on Windows is that you use Ctrl+Left and Right to do line-wise navigation in text boxes and the URL bar of your browser and then you use Alt+Left and Right to go Back and Forwards that way you don’t mix the two up.
This is where the controversy came in because nephele was dead set against this idea and against the whole premise. So I’d like to propose an alternatives which is
We go the “Mac” way and use Alt for Switcher and WebPositive Back and Forwards and line-wise navigation in Text Boxes and deal with the conflicts as macOS has. This would mean that we should change the Twitcher shortcut from Ctrl+Tab to Alt+Tab and leave the WebPositive Back and Forwards how they are with Alt+Left/Right.
Another more radical proposal might be to go full Windows and stop using Alt but use Ctrl instead for text box nav, shortcuts. We’d have to figure out how to deal with the conflict between copy and interrupt in Terminal though as Windows/Linux have.
However I don’t think that’s in the spirit of what BeOS was trying to achieve. I realize I’m not going to make everybody happy here but this is my cohesive shortcut design proposal: copy Windows with Ctrl and Alt swapped, like Be mostly did.