| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #1129
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | OSX shortcut() ignoring case with FL_ALT+'X' |
Version: | 1.1-current |
Created By: | greg.ercolano |
Assigned To: | matt |
Fix Version: | 1.1.7 (SVN: v4727) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | greg.ercolano 05:08 Dec 18, 2005 |
| I noticed a platform specific inconsistency with shortcut()s:
button_a->shortcut(FL_ALT+'j'); // ALT+J (OK ON OSX/LINUX) button_b->shortcut(FL_ALT+'J'); // ALT+SHIFT+J (FAILS ON OSX)
(note uppercase 'J' in button_b)
Under linux the above works as expected, but under OSX, button_b doesn't trigger when ALT+SHIFT+J is pressed.
The workaround that works consistently across platforms is to specify FL_SHIFT explicitly:
button_a->shortcut(FL_ALT + 'j'); // ALT+J button_b->shortcut(FL_ALT + FL_SHIFT + 'J'); // ALT+SHIFT+J
..which works under linux and osx.
Although I'd agree the latter is better syntax, the former should work too, as I think a) it is intended by the API, and b) what is generated by fluid (0x8004a = FL_ALT+'J').
This issue came up when a fluid program I developed on a linux machine that had uppercase ALT+shortcuts weren't triggering on OSX. | |
|
#2 | greg.ercolano 05:34 Dec 18, 2005 |
| Followup: of interest, there might also be a related issue with fluid.
It seems a "shortcut(FL_ALT|FL_SHIFT|'j');" in code will be triggered under OSX if the ALT/OPTION key is used for the ALT key.
But, there's a difference in the behavior of fluid under OSX vs Linux for setting a shortcut for ALT+SHIFT+J:
Fluid under OSX: generates 0x9006a (FL_ALT | FL_SHIFT + 'j') Fluid under Linux: generates 0x8004a (FL_ALT | 'J')
..which is why programs developed on linux and compiled on OSX behave differently from vice versa.
If the reported bug is fixed, the above discrepency in fluid will be moot. But possibly for consistency sake, fluid should behave consistently. | |
|
#3 | matt 05:35 Dec 30, 2005 |
| OK, so this is *really* messed up: Typing 'a' generates 'a' as a shortcut and 'A' as a label Shift-'a' generates 'A' as a shortcut and also 'A' as a label Shift-Ctrl-'a' generates Ctrl-A and the right label 'Shift-Ctrl-A'
I will fix this, trying to be sensible to existing software, but I am pretty sure we will have complaints! | |
|
#4 | matt 06:12 Dec 30, 2005 |
| Fixed in Subversion repository.
Please test this out. There may be (very few) incidents where shortcut behavior might have changed. | |
[ Return to Bugs & Features ]
|
| |