nethack-el-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nethack-el-devel] Using directions with other keybindings


From: Istvan Marko
Subject: Re: [Nethack-el-devel] Using directions with other keybindings
Date: Sat, 09 Aug 2003 10:45:09 -0700
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Mario Domgörgen <address@hidden> writes:

> I use the following in my emacs:
> ,---- 
> | (add-hook 'nethack-map-mode-hook
> |       (lambda () 
> |         (define-key nh-map-mode-map (kbd "<left>") 'nethack-command-west)
> |         (define-key nh-map-mode-map (kbd "<up>") 'nethack-command-north)
> |         (define-key nh-map-mode-map (kbd "<down>") 'nethack-command-south)
> |         (define-key nh-map-mode-map (kbd "<right>") 'nethack-command-east)
> |         (define-key nh-map-mode-map (kbd "<home>") 
> 'nethack-command-northwest)
> |         (define-key nh-map-mode-map (kbd "<prior>") 
> 'nethack-command-northeast)
> |         (define-key nh-map-mode-map (kbd "<end>") 
> 'nethack-command-southwest)
> |         (define-key nh-map-mode-map (kbd "<next>") 
> 'nethack-command-southeast)
> |         ))
> `----

This looks OK to me. With recent emacs versions you could also use
eval-after-load:

(eval-after-load "nethack"
  '(progn
     (define-key nh-map-mode-map (kbd "<left>") 'nethack-command-west)
     (define-key nh-map-mode-map (kbd "<up>") 'nethack-command-north)
     ...))

> If i want to open a door wit o for example pressing <up> does result in
> nothing, but k works great... ?!

Are you using the numerical keypad? Are those keys sending the key
sequences you expect? Or maybe it's kp-left, kp-up etc? You can verify
with C-h k <hit the keypad-left key here> for example.

-- 
        Istvan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]