From dfe555f059134246d917866de325bb4be4d29a89 Mon Sep 17 00:00:00 2001 From: John Fultz Date: Mon, 25 Aug 2014 12:00:40 -0500 Subject: Add Polish alphabet. Fix AltGr keyboard events. This fixes a reported problem under Windows (it was probably an issue on other platforms, too) where, if you're using a keyboard that requires AltGr in order to type Scrabble letters on the board, they simply won't type. For example, the Windows "Polish Programmers" keyboard. Polish alphabet submitted by Adam Klimont, and tested by me. Dictionary to come soon. --- quacker/graphicalboard.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'quacker/graphicalboard.cpp') diff --git a/quacker/graphicalboard.cpp b/quacker/graphicalboard.cpp index e630e63..628686b 100644 --- a/quacker/graphicalboard.cpp +++ b/quacker/graphicalboard.cpp @@ -574,7 +574,12 @@ void GraphicalBoardFrame::keyPressEvent(QKeyEvent *event) break; case Append: - if (event->modifiers() & Qt::AltModifier || event->modifiers() & Qt::ControlModifier || event->text().isEmpty()) + if (event->modifiers() & Qt::AltModifier && event->modifiers() & Qt::ControlModifier) + { + if (event->text().isEmpty()) + break; // let AltGr (Ctrl+Alt) events slip through + } + else if (event->modifiers() & Qt::AltModifier || event->modifiers() & Qt::ControlModifier || event->text().isEmpty()) { event->ignore(); return; -- cgit v1.2.3