summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2014-08-25 12:00:40 -0500
committerJohn Fultz <jfultz@wolfram.com>2014-08-25 12:00:40 -0500
commitdfe555f059134246d917866de325bb4be4d29a89 (patch)
tree80335f7c9e79a12a6e2e150280c53f89c65c3a6e
parent46e79f5233447d39fcae01681c41a4e68d04e7b3 (diff)
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.
-rw-r--r--data/alphabets/polish.quackle_alphabet33
-rw-r--r--quacker/graphicalboard.cpp7
2 files changed, 39 insertions, 1 deletions
diff --git a/data/alphabets/polish.quackle_alphabet b/data/alphabets/polish.quackle_alphabet
new file mode 100644
index 0000000..268065d
--- /dev/null
+++ b/data/alphabets/polish.quackle_alphabet
@@ -0,0 +1,33 @@
+A a 1 9 1
+Ą ą 5 1 1
+B b 3 2 0
+C c 2 3 0
+Ć ć 6 1 0
+D d 2 3 0
+E e 1 7 1
+Ę ę 5 1 1
+F f 5 1 0
+G g 3 2 0
+H h 3 2 0
+I i 1 8 1
+J j 3 2 0
+K k 2 3 0
+L l 2 3 0
+Ł ł 3 2 0
+M m 2 3 0
+N n 1 5 0
+Ń ń 7 1 0
+O o 1 6 1
+Ó ó 5 1 1
+P p 2 3 0
+R r 1 4 0
+S s 1 4 0
+Ś ś 5 1 0
+T t 2 3 0
+U u 3 2 1
+W w 1 4 0
+Y y 2 4 1
+Z z 1 5 0
+Ź ź 9 1 0
+Ż ż 5 1 0
+blank 0 2
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;