任务单 #17291

Key catching is somewhat broken.

开放日期: 2009-06-13 02:08 最后更新: 2009-06-15 18:31

报告人:
属主:
(无)
类型:
状态:
开启
组件:
(无)
里程碑:
(无)
优先:
4
严重性:
5 - Medium
处理结果:
文件:

Details

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.

任务单历史 (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. » 登录名