待辦事項 #17291

Key catching is somewhat broken.

啟用日期: 2009-06-13 02:08 最後更新: 2009-06-15 18:31

回報者:
負責人:
(無)
類型:
狀態:
開啟
元件:
(無)
里程碑:
(無)
優先權:
4
嚴重程度:
5 - 中
處理結果:
檔案:

細節

Effect of shift with numpad is not being handled properly when numlock is on.

In a little more detail:

numlock on :

  • Numpad numerals work to move.
  • Shift+number does not run.

numlock off :

  • Numpad numerals work to move.
  • Shift+number works to run.

Ticket History (3/8 Histories)

2009-06-13 02:08 Updated by: paulblay
  • New Ticket "Key catching is somewhat broken." created
2009-06-13 23:05 Updated by: paulblay
  • Details Updated
2009-06-14 01:47 Updated by: paulblay
  • Details Updated
2009-06-14 02:28 Updated by: csartanis
評語

I looked into this a bit but haven't found the bug yet. Special keys are handled with macros. I believe WM_KEYDOWN catches all keys that aren't handled with WM_CHAR and then inserts a macro for that key into the input stream. The macros all match vanilla, so I dont know what is going wrong.

2009-06-14 19:50 Updated by: paulblay
評語

With the up arrow numpad ('8') what looks like the correct hex string is sent, but that is converted to '141' later which looks a bit suspect to me. Anyway it ends up with CMD_UNKNOWN instead of ;8. I should probably look in more detail at what the Vanilla Angband version does.

2009-06-14 22:07 Updated by: paulblay
  • Details Updated
2009-06-15 17:09 Updated by: paulblay
評語

Found a workaround (but not a fix). Setting keymaps or macros for the keys that don't work (mostly) does the trick. N.B. Numlock needs to be off or running won't work.

# Macro '6'
A:;8
P:\[Up]

# Macro '9'
A:;4
P:\[Left]

# Macro '11'
A:;6
P:\[Right]

# Macro '14'
A:;2
P:\[Down]

#keymap

A:;2
C:0:\x8A

A:;4
C:0:\x8B

A:;6
C:0:\x8C

A:;8
C:0:\x8D
2009-06-15 18:31 Updated by: paulblay
  • Details Updated
評語

Still not completely fixed, but improved.

Attachment File List

No attachments

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入