Aegisub icon indicating copy to clipboard operation
Aegisub copied to clipboard

Aegi 3.4.X does not work with the numeric keypad

Open L3E2A2 opened this issue 10 months ago • 3 comments

Aegi 3.4.X does not work with the numeric keypad, it identifies it as the position keys

L3E2A2 avatar Feb 24 '25 17:02 L3E2A2

Not reproducible on 3.4.2. If I'm guessing correctly, please first check whether you enabled your Num Lock.

EL-File4138 avatar Feb 24 '25 17:02 EL-File4138

I am having the same issue. I am on a MacBook running MacOS Sonoma 14.4 (23E214). I am using an external keyboard which does not have a numlock key, and the Mac doesn't know about numlock anyway.

I have verified in various web keyboard event testers that the keyboard is sending a number pad event code, but the event.key value is the number (1, 2, etc). I do not appear to be able to change this in any reasonable way short of finding a way to edit my keyboard layout in my operating system, and honestly I don't know what I'd edit it to. I'm not really a programmer, just someone trying to make subtitles for things. I didn't even have a GitHub account this morning; I made one in order to report this bug, since it's making it very hard to create the hotkeys I want.

I don't know if this is useful, but here's a screenshot of the Javascript event sent by pressing the number pad 5. (Ignore the history, I thoughtlessly tried to take a screenshot without thinking about the problem of it capturing the keyboard events for it)

Image

And here's one for pressing the regular 5 key:

Image

As you can see, the event.key value is the same, which I suspect is related to why Aegi detects it as a regular 5 and not the number pad 5. I'm thinking it needs to be changed to use the event.code rather than event.key??? Like I said, I'm not really a programmer.

kalanyy avatar Mar 16 '25 21:03 kalanyy

@kalanyy Aegisub correctly references keypress by key code received from the wxWidget layer, see

https://github.com/TypesettingTools/Aegisub/blob/18175e4577277b1394f3abec1bd94eb914610b6c/src/hotkey.cpp#L133-L222

If possible, please check whether your system is correctly passing keypress to the application. I don't have any experience on MacOS so I cannot attest, but a browser getting first-class support does not equal the system treating every other application the same. Also, the author reports Numpad key being read as position key, which is different from the Numpad being read as numbers. So It's not exactly "the same". If you wish, you can open a new issue.

EL-File4138 avatar Mar 16 '25 22:03 EL-File4138