[haiku-development] A word about shortcuts on non-default keymaps. ( Was: [Haiku-commits] r23791 - haiku/trunk/src/apps/terminal )

  • From: Siarzhuk Zharski <zharik@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 03 Feb 2008 23:45:10 +0100

Good evening, Gentlemen,

Excuse me, that I have moved this discussion from commit-logs list. ;-) I just hope on a bit wider auditory. ;-)

François Revol wrote:
Axel Dörfler wrote:
jackburton at BerliOS <jackburton@xxxxxxxxxxxxxxx> wrote:
Added shortcuts to increase and decrease the font size. Since these key combinations (ALT + +/-) can't be used on many keymaps, we might want to change.
Maybe we rather want to fix the shortcut mechanism :-)
I'm not sure about backwards compatibility for apps like Pe (which

It does it incorrectly btw (setting shortcuts based on scancodes instead of letter).

allow to configure the shortcuts), but other than that, the best approach would be to use the shortcuts specified via the Be API as location of the shortcut key - the actual character would change with the location on the keymap.

That's exactly what Pe does and it's plain unacceptable.
The default shortcuts for an azerty keymap become
Alt-A to Quit
Alt-Q to SelectAll
which is plain non-sense.

We might want to check first in the keymap has the key unshifted then try a shifted key.
This would make ALT+'1' work for azerty regardless if SHIFT is asked.
It might not be enough for symbols requiring dead keys though...
"The Question of Shortcuts" is very significant for people with non-latin keymaps. It is usual for russian-speaking users to have their system configured for simultaneous using both English and Russian keymaps. To switch between those keymaps some people use customized, hand-made keymaps with switching by CapsLock, some use the Switcher application to change keymaps on the fly. The problem is that either English or Cyrillic keymaps can be active when the user want to press the shortcut combination. And this combination will work only for English keymap, because application have no idea what to do with Cyrillic symbols. Believe me, it is very uncomfortable to have shortcuts that are non-functional about half of working time. :-) And for us scancode-based shortcuts are more preferable than symbolic ones. Symbolic shortcuts are also "bad" for us from other side - the position of key that correspond to some action is different for English and for Russian language. For example, every time I try to save my work, I have to keep in mind which keymap is active and which key combination must I press, either Alt-S or Alt-C. So such shortcuts are not really "short". :-( By the way the Switcher application, that I have mentioned above, convert the Alt-<key> combinations from Russian to English on the fly. We have to force the developer to do such dirty hacking in his application. :-)

PS: And last word about keymaps switching today. I have prepared a "Haiku KeymapSwitcher package" for local using in russian-speaking community. This package based on Switcher (http://bebits.com/app/233) sources. This application is available under MIT license. There are also ticket in the Trac about such application: http://dev.haiku-os.org/ticket/1449. I'll be very glad to contribute this into our actual source tree. Are there any objections against it? The package contains KeymapSwitcher application that usually lives in Deskbar's shelf and input_server filter to hook hotkeys and perform keymap switching.

Kind Regards,

Other related posts: