M M wrote:
> Buttons can be activated with alt+'X' where x is the shortcut letter.
> But shift+'X' also activates it. Is that the correct behaviour? See
> test/button.cxx. Both alt+'b' and shift+'b' activates the beep button.
> This is tested with 1.1.9 version and with Vista and Linux.
Seems correct behavior under linux/Xwindows, and unexpected
for MS Windows.
You can see this exact behavior in Firefox 3.0 for Linux
in e.g. the Edit->Preferences pane (see below to replicate).
However, under windows with the same version of Firefox,
the preferences pane button shortcuts only respond to ALT.
Arguably, FLTK's keyboard behavior should be consistent
with the native platform, and here I think you're seeing
unix specific behavior carried over to the other platforms,
due to FLTK's original design roots from SGI/Xwindows.
This has been brought up before. I myself brought up an issue
regarding inconsistent cursor movement keys in the text editor
where users expect native behavior that differs between platforms.
Historically FLTK's lie in SGI/Xwindows, and when ported to other
platforms, attention was paid to making everything perform as
consistently as possible with the X version, as people wanted
their X apps on e.g. windows with the same behavior.
But this caused friction with a stream of users used to Windows
behavior using FLTK. Since then, it was decided that maybe
keyboard behavior is an exception to the 'consistency' rule,
and slowly FLTK's keyboard behaviors are being made consistent
with native expectations.
So long story short, yeah, the behavior you describe is correct
on X, but should be prevented under Windows. (Not sure about Macs).
REPLICATION IN FIREFOX 3.0 ON *LINUX*
-------------------------------------
If you run Firefox 3.0 on Linux and open the Preferences pane,
you can see the same exact behavior you describe for all the
buttons with shortcuts:
1) Edit -> Preferences
2) In the Preferences dialog under "Main", there are
several buttons with shortcuts:
Use _Current Pages
Use _Bookmark
_Restore to Default
_Manage Add-ons...
3) If no input fields are in focus, e.g. the
'Manage Add-ons...' function can be invoked with any of
'm', alt-m, or shift-m.
However, Firefox 3.0 on Windows only responds to ALT keys
for the button shortcuts.
On FF3 for Mac, the buttons have NO shortcuts indicated.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk