Michel Bardiaux wrote:

Dave Williss wrote:

----- Original Message ----- From: "Michel Bardiaux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 29, 2004 3:37 AM
Subject: Re: [Lesstif-discuss] Controversial (?) fix for accelerators



[anip]



I thought that OSF Motif 1.2 _did_ have this feature, but I just proved
myself wrong. People only started complaining about it when we changed to
Lesstif because at the same time we changed the accelerators for
Cut/Copy/Paste in our software to the Ctrl-X/Ctrl-C/Ctrl-V that everybody
expects so they just started using them. Before they were Shift+Del,
Ctrl+Ins, and Shift+Ins which nobody used and therefore didn't notice the
problem.


OK, given that, I'd call this a bug in Motif, and Lesstif just faithfully
reproduces the same bug.  The reason I'd consider it a bug is that the
resource file has...

    *copy.accelerator:  Ctrl<Key>c

Which follows the Xt syntax for translations.  According to Appendix F of
the X Toolkit Intrinsics Reference Manual....

* If an exclamation point (!) is specified at the beginning of the
modifier list, it means that the listed modifiers must be in the correct
state and no other modifiers can be asserted.
* If any modifiers are specified and an exclamation point (!) is not
specified, it means that the listed modifiers must be in the correct state
and "don't care" about any other modifiers.


I have no bang, therefore other modifiers should be ignored.


I agree. Besides, it makes software *more* difficult to use: when in CAPLOCKS (which is useful if you have to enter text in all caps because of some business rule), you have to use... Ctrl+Shift+c - or maybe that does not work... and since *that* is not obvious, the bug also violates the 'principle of least astonishment'.

After sleeping on it, I remembered a few things, but they actually make matters more muddy:

(1) My fixes rely on changing XmNaccelerator to a string with *multiple* events, and it works (not tested with Lesstif), but that's explicitly forbidden by the XmLabel man page as it is in OpenMotif2.1!

(2) I also had to write code to ignore NumLock and CapLock on Button events because I use Ctrl<Button3> (for a different popup then <Button3> !) and it did not popup when NumLock was on. And *that* is weird because popups are installed using XtOverrideTranslations and XtParseTranslationTable. Stricly Xt stuff! So I begin to suspect a bug in libXt: maybe the translation table code there does not comply with its own specification? (BTW the strategy I followed here was to simply use my own events loop everywhere and erase the appropriate bits in each button event)

HaND,
--
Michel Bardiaux
Peaktime Belgium S.A.  Bd. du Souverain, 191  B-1160 Bruxelles
Tel : +32 2 790.29.41



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Lesstif-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lesstif-discuss

Reply via email to