Opened 16 years ago
Last modified 4 years ago
#3980 assigned enhancement
[patch] Keyboard shortcut icon for Apple keyboards
Reported by: | VinDuv | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1.1 |
Component: | Kits/Interface Kit | Version: | R1/pre-alpha1 |
Keywords: | Cc: | planche2k@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Depending on the keymap chosen in the Keymaps preflet, the keyboard shortcut icon in the menus shows "ALT" or "CTL". This is not appropriate when using an Apple keyboard, which has a Command key.
The attached patch adds a "CMD" icon to the shortcut icons, and use it when an Apple keymap is used. It also disables the "Switch Shortcut Keys" in the Keymaps preflet, which does not makes much sense in that case.
Attachments (2)
Change History (12)
by , 16 years ago
Attachment: | cmd_shortcut.diff added |
---|
follow-up: 2 comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
Replying to andreasf:
Your patch introduces a potential
NULL
dereference ofkeys
insrc/kits/interface/Menu.cpp
.
Whoops, fixed ;)
I'm less certain why in presence of the command key the alt and ctrl alternatives - present on Apple keyboards, too - should be disallowed.
I wasn't sure if it was really useful... Mac users are generally accustomed to using the Command key for keyboard shortcuts, so allow switching to Control is probably not needed.
Anyway, I reactivated the button in this new patch and fixed the mode detection so it shows "Switch Shortcut Keys To Windows/Linux Mode" or "Switch Shortcut Keys To Haiku/Mac OS Mode" instead of just "Switch Shortcut Keys" for Apple keymaps.
comment:3 by , 16 years ago
Just a few comments: the B_COMMAND_IS_* constants should not be public or used at all, since we already have modifier constants that can do the job.
I don't like the "/Mac OS" addition in Keymaps, and would just remove it again - the check now looks wrong, too, as it will detect Windows/Haiku mode now incorrectly.
comment:4 by , 15 years ago
patch: | → 0 |
---|
comment:5 by , 15 years ago
patch: | 0 → 1 |
---|
comment:6 by , 13 years ago
patch: | 1 → 0 |
---|
comment:7 by , 10 years ago
Milestone: | R1 → Unscheduled |
---|
comment:9 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:10 by , 4 years ago
Milestone: | R1 → R1.1 |
---|
Your patch introduces a potential
NULL
dereference ofkeys
insrc/kits/interface/Menu.cpp
.I'm less certain why in presence of the command key the alt and ctrl alternatives - present on Apple keyboards, too - should be disallowed.
But the shortcut icon is a neat idea, I'll have to try it out sometime. :)