[ Return to Bugs & Features | Roadmap 1.1 ]
|Status:||1 - Closed w/Resolution|
|Priority:||3 - Moderate, e.g. unable to compile the software|
|Scope:||3 - Applies to all machines and operating systems|
|Summary:||OSX shortcut() ignoring case with FL_ALT+'X'|
|Fix Version:||1.1.7 (SVN: v4727)|
Trouble Report Files:
Trouble Report Comments:
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.
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.
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!
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 ]