Hello guys,
while working through the Debian BTS I've found a wishlist bug with a patch
attached to make use of the Metakey within LyX. I donno if you like the patch
nor if it's correct.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=344147
-----------cut------------------
When using the Emacs keybindings, many Lyx functions are bound to keystrokes
that are documented and shown in the menus prefixed with M- (Meta).  This
key is associated with the Mod1 modifier on my Sun type 5 and type 6
keyboards and (presumably) other keyboards with Meta keys.  On PC keyboards,
Mod1 is bound to Alt.

The xforms version of Lyx checks for this modifier and works as
expected.  The Qt version doesn't, because it only checks for Alt.

As the shortcuts in lyx-qt haven't been changed to read "Alt-" and the
previous xforms version used to work fine with Meta keys, I'm considering
this a regression -- hence the non-wishlist severity.

The simple patch below fixes this problem by treating Alt and Meta the same
in the Qt frontend.  It is submitted here in hopes of inclusion in an
upcoming revision, and to keep my number of useless Bugzilla accounts down ;)


diff -Nuar lyx-1.3.6_orig/src/frontends/qt2/QContentPane.C 
lyx-1.3.6/src/frontends/qt2/QContentPane.C
--- lyx-1.3.6_orig/src/frontends/qt2/QContentPane.C     2005-07-14 
09:42:47.000000000 +0100
+++ lyx-1.3.6/src/frontends/qt2/QContentPane.C  2005-12-18 02:46:59.000000000 
+0000
@@ -36,7 +36,7 @@
                k |= key_modifier::ctrl;
        if (state & Qt::ShiftButton)
                k |= key_modifier::shift;
-       if (state & Qt::AltButton)
+       if (state & Qt::AltButton || state & Qt::MetaButton)
                k |= key_modifier::alt;
        return k;
 }


Cheers,
Stelios Bounanos (sb()enotty()net)

----------------cut-----------------


Thank you for taking a look at this issue,
Sven
-- 
If you won't forgive me the rest of my life
Let me apologize while I'm still alive
I know it's time to face all of my past mistakes
  [Less than Jake - Rest Of My Life]

Reply via email to