tetris: the # key emits XK_KP_Divide on this device, register that for pause
Correct the pause binding: the physical # key produces XK_KP_Divide (previously assumed XK_slash). On-screen label still reads '# PAUSE'.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -433,9 +433,9 @@ static void handle_key(KeySym ks) {
|
|||||||
if (state == PLAYING) { hard_drop(); }
|
if (state == PLAYING) { hard_drop(); }
|
||||||
break;
|
break;
|
||||||
// Pause: P, 3, *, and the # key. NOTE: on this device the # key emits
|
// Pause: P, 3, *, and the # key. NOTE: on this device the # key emits
|
||||||
// XK_slash (not XK_numbersign), so register slash too while the on-screen
|
// XK_KP_Divide (not XK_numbersign), so register KP_Divide too while the
|
||||||
// label still shows '#'.
|
// on-screen label still shows '#'.
|
||||||
case XK_p: case XK_3: case XK_numbersign: case XK_asterisk: case XK_slash:
|
case XK_p: case XK_3: case XK_numbersign: case XK_asterisk: case XK_KP_Divide:
|
||||||
if (state == PLAYING) {
|
if (state == PLAYING) {
|
||||||
state = PAUSED;
|
state = PAUSED;
|
||||||
} else if (state == PAUSED) {
|
} else if (state == PAUSED) {
|
||||||
|
|||||||
Reference in New Issue
Block a user