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 18:02:54 -0700
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Mario Domgörgen <address@hidden> writes:

> Istvan Marko <address@hidden> writes:
>
>>> 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.
>
> If i use C-h k i get <left> and i can move, but then i hit o and then
> <left> i see "o kp-right" in the message-line?! Very strange
> behaviour.... 

Sorry, I didn't read your original email carefully enough. So the
arrow keys work for regular movement but they don't work after "o"
right?

I think this is caused by the function nh-read-char (at the end of
nethack-compat.el) using read-char-exclusive, which doesn't seem to
accept function key events. I am not sure if this is the proper way to
fix this but replacing read-char-exclusive with read-event in
nh-read-char gets it working for me:

(defun nh-read-char (&optional prompt)
  (message prompt)
  (let ((char (read-event)))
    (message "")
    (nh-char-to-int char)))

> BTW: Thanks for nethack-el so that i can stay even longer in
> emacs.... :)

Same here (I am not one of the authors :)

(I have re-added the nethack-el-devel list to the Cc:, I hope you
don't mind)
-- 
        Istvan




reply via email to

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