On Sat, Apr 30, 2016 at 11:46:17AM -0400, Scott Kostyshak wrote:
> On Thu, Apr 28, 2016 at 10:34:25AM +0200, Kornel Benko wrote:
> > Am Donnerstag, 28. April 2016 um 00:21:36, schrieb Kornel Benko 
> > <kor...@lyx.org>
> > > Am Mittwoch, 27. April 2016 um 23:55:49, schrieb Stephan Witt 
> > > <st.w...@gmx.net>
> > > > Am 27.04.2016 um 17:48 schrieb Scott Kostyshak <skost...@lyx.org>:
> > > > > 
> > > > > On Wed, Apr 27, 2016 at 07:46:22AM +0200, Stephan Witt wrote:
> > > > >> Am 27.04.2016 um 07:43 schrieb LyX Ticket Tracker <t...@lyx.org>:
> > > > >>> 
> > > > >>> #10096: Keyboard shortcut for interword space does not work on Mac
> > > > >>> -----------------------+-------------------------
> > > > >>> Reporter:  ksvanhorn  |       Owner:  lasgouttes
> > > > >>>    Type:  defect     |      Status:  new
> > > > >>> Priority:  normal     |   Milestone:
> > > > >>> Component:  general    |     Version:  2.1.4
> > > > >>> Severity:  normal     |  Resolution:
> > > > >>> Keywords:             |
> > > > >>> -----------------------+-------------------------
> > > > >>> 
> > > > >>> Comment (by stwitt):
> > > > >>> 
> > > > >>> The LyX version doesn't matter. The clash of the short cuts can be 
> > > > >>> avoided
> > > > >>> by disabling or changing the Finder short cut or by changing it in 
> > > > >>> LyX.
> > > > >> 
> > > > >> This reminds me that short cuts cannot be changed in LyX with Qt 
> > > > >> 5.6.0 -
> > > > >> IMHO a possible show stopper for using Qt 5.6.
> > > > > 
> > > > > Agreed. This is #10075. I think this is the biggest known issue and is
> > > > > definitely a show stopper.
> > > > 
> > > > It looks like QEvent::ShortcutOverride is not emitted anymore with Qt 
> > > > 5.6.
> > > > Why not using QEvent::KeyPress? Do I miss something here?
> > > > 
> > > > Please, can anyone try the attached patch on Linux and/or Windows?
> > > > Perhaps the change should be guarded by some Qt-version check.
> > > > 
> > > > Stephan
> > > 
> > > Works with qt5.6rc on Mint17(== ubuntu14.02).
> > 
> > I was too optimistic. Shortcut settings does not work for any key 
> > combination.
> > Testing with Alt+(any of F, M, O, S, V) is not getting the signal. (At 
> > least 'lyx -dbg key' does not show anything)
> > This is if I select Slovak gui.
> 
> > Selecting English gui now ... Following keys are not valid: Alt+[DFLOS]
> 
> I can reproduce this, both with patch+Qt 5.6 and with patch+Qt 4.8.6.
> This does not happen with Qt 4.8.6 without the patch.

I don't know what I'm doing but in brief testing the attached patch
works for me with Qt 5.6 and 4.8.6.

Scott
diff --git a/src/frontends/qt4/CustomizedWidgets.cpp 
b/src/frontends/qt4/CustomizedWidgets.cpp
index b6dc73f..4edcc92 100644
--- a/src/frontends/qt4/CustomizedWidgets.cpp
+++ b/src/frontends/qt4/CustomizedWidgets.cpp
@@ -123,12 +123,12 @@ bool ShortcutWidget::event(QEvent * e)
                        has_cursor_ = true;
                        setFrameShadow(QFrame::Sunken);
                        break;
-               case QEvent::ShortcutOverride:
+               case QEvent::KeyRelease:
                        keyPressEvent(static_cast<QKeyEvent *>(e));
                        return true;
-               case QEvent::KeyRelease:
-               case QEvent::Shortcut:
                case QEvent::KeyPress:
+               case QEvent::Shortcut:
+               case QEvent::ShortcutOverride:
                        return true;
                default: 
                        break;

Attachment: signature.asc
Description: PGP signature

Reply via email to