elanthia-online / illthorn

Electron-based FE
18 stars 10 forks source link

Add support for moving directly via keyboard numpad #175

Closed jasedit closed 3 years ago

jasedit commented 3 years ago

This matches the feature found in a number of other front ends, allowing for faster keyboard based movement with the numpad.

jasedit commented 3 years ago

@ondreian I can move it into a separate module, no problem. I'm not sure how to have the numpad module intercept the events so the CLI doesn't update the text field however. Do you have any suggestions on how to tackle that?

ondreian commented 3 years ago

calling e.preventDefault() should do that (as you have done already)

jasedit commented 3 years ago

Ah - so it won't block CLI from processing the event in that case, but it won't matter because the CLI doesn't explicitly add the keypress, and they keys of interest don't do anything in the CLI otherwise. Thanks!

jasedit commented 3 years ago

Updated, and appears to be working from my local testing. Let me know what you think when you've got a moment!

ondreian commented 3 years ago

thanks