Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I would like to change the keyboard controls for Emacs Tetris. Is this possible?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

Meta-x apropos tetris

hmm...

tetris-move-bottom
tetris-move-left
tetris-move-right
tetris-rotate-next
tetris-rotate-prev

That looks promising... looking in tetris.el:

(defvar tetris-mode-map
  (make-sparse-keymap 'tetris-mode-map))

(define-key tetris-mode-map "n"     'tetris-start-game)
(define-key tetris-mode-map "q"     'tetris-end-game)
(define-key tetris-mode-map "p"     'tetris-pause-game)
(define-key tetris-mode-map " "     'tetris-move-bottom)
(define-key tetris-mode-map [left]  'tetris-move-left)
(define-key tetris-mode-map [right] 'tetris-move-right)
(define-key tetris-mode-map [up]    'tetris-rotate-prev)
(define-key tetris-mode-map [down]  'tetris-rotate-next)

redefine those and you are good to go.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.