tetris: register the # key (which emits XK_slash on this device) as pause
The physical # key produces XK_slash, not XK_numbersign, so add XK_slash to the pause binding. The on-screen label still reads '# PAUSE'.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -432,7 +432,10 @@ static void handle_key(KeySym ks) {
|
||||
case XK_space: case XK_0:
|
||||
if (state == PLAYING) { hard_drop(); }
|
||||
break;
|
||||
case XK_p: case XK_3: case XK_numbersign: case XK_asterisk:
|
||||
// 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
|
||||
// label still shows '#'.
|
||||
case XK_p: case XK_3: case XK_numbersign: case XK_asterisk: case XK_slash:
|
||||
if (state == PLAYING) {
|
||||
state = PAUSED;
|
||||
} else if (state == PAUSED) {
|
||||
|
||||
Reference in New Issue
Block a user