You are not logged in.
Pages: 1
Hi,
does anyone know if it's possible to remap the "Pause" key in the LTris game?
Currently it's on "p", I'd like it to be on "Space".
Offline

This is not possible from within the game. You should go upstream for support, otherwise, you may experiment with Autokey.
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
Thank you. I submitted a patch to the original author. Should I submit it to an Arch-Maintainer/Packager as well?
diff -rupN ./src/manager.c ../ltris-1.0.16_new//src/manager.c
--- ./src/manager.c	2011-03-03 12:35:14.000000000 +0100
+++ ../ltris-1.0.16_new//src/manager.c	2011-08-17 14:51:09.684611354 +0200
@@ -270,6 +270,7 @@ void manager_create()
     filter[SDLK_RETURN] = 0;
     filter[SDLK_q] = 0;
     filter[SDLK_p] = 0;
+    filter[SDLK_SPACE] = 0;
     filter[SDLK_f] = 0;
     
     /* menus are added to this list for deleting later */
diff -rupN ./src/tetris.c ../ltris-1.0.16_new//src/tetris.c
--- ./src/tetris.c	2011-03-02 16:08:09.000000000 +0100
+++ ../ltris-1.0.16_new//src/tetris.c	2011-08-17 14:50:48.787945586 +0200
@@ -103,7 +103,7 @@ int confirm( Font *font, char *str, int
                 }
                 else
                 if ( type == CONFIRM_PAUSE ) {
-                    if ( event.key.keysym.sym == SDLK_p ) {
+                    if ( (event.key.keysym.sym == SDLK_p) || (event.key.keysym.sym == SDLK_SPACE) ) {
                         ret = 1; go_on = 0;
                         break;
                     }
@@ -390,6 +390,9 @@ void tetris_run()
                          case SDLK_p:
                              request_pause = 1;
                              break;
+                         case SDLK_SPACE:
+                             request_pause = 1;
+                             break;
                          case SDLK_f:
                              /* switch fullscreen */
                             config.fullscreen = !config.fullscreen;Last edited by joe.koenig (2011-08-17 16:28:01)
Offline

joe.koenig, please enclose this patch listing in [ code ] tags (without the intervening spaces): https://wiki.archlinux.org/index.php/Fo … s_and_Code
To know or not to know ...
... the questions remain forever.
Offline
Pages: 1