-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rectangular selection mode initialization inserts garbage characters #3539
Comments
Can you reproduce this with Scite? |
The shift key is supposed to invert the lock keys, caps lock and num lock. So with num lock off you are typing |
I never heard of the idea that shift should invert num lock. And I think it is really not good idea, But if this behaviour is part of GTK, it is not a topic to solve in this issue. Nevertheless it is possible |
Windows interprets Alt+NumericKeypad keys as entering characters by their numeric values. https://en.wikipedia.org/wiki/Alt_code Scintilla can't prevent this from happening so the Win32 platform was patched to ignore numeric keypad keys with Alt. https://sourceforge.net/p/scintilla/bugs/2152/ This could be added to GTK on Windows but it actually stops what the poster wants because it disables the ability to use the keypad for rectangular selection. It would, however, be clearer and users can be directed to the true navigation keys instead of trying to use the numeric key pad. |
@r0polach your OP didn't say Windows. My reply was for Linux. An easy way to see what key sequences are being generated in Geany (after munging by the OS and GTK) is to use
Maybe you can try it in Windows. Not sure what happens on Macos. @nyamatongwe thanks for the explanation. Certainly using the hard arrow keys is the best solution for keyboards that have them. |
Thanks all for information. |
Ok, so GTK3 on Windows behaves differently to GTK3 on Linux. The whole keyboard interpretation thing is really messy, GTK is trying to interpret keyboard signals to the functionality written on the keycaps depending on the keyboard model specified. That Windows hijacks some combinations just makes it worse.
Scintilla default keybindings are not modified by Geany so they happen because any key event not caught by Geany is simply passed unchanged to Scintilla, which is what would normally happen to In the keybinding dialog Geany has a keygrab on the dialog which is not present on the Scintilla widget and may have an effect, causing either Windows to not do the numeric entry thing, or its being ignored by GTK, anyway it does not seem to be seen in the dialog. Normally any key combinations not defined in Geany are passed to Scintilla, so it appears to be seeing the selection extension keycode and the Windows numeric entry value which it quite reasonably takes as text to replace the selection. Possibly the patch @nyamatongwe suggested applying to Scintilla on GTK on Windows is the best solution, it prevents replacing your selection by junk at the expense of removing the capability to use the keypad arrows to extend selection. |
When I initiate rectangular selection mode by shift + alt + numpad_arrow_key,
geany puts some garbage characters into selected positions. This happens only
with numpad arrow keys (with num lock off), not with ordinary arrow keys.
This affect version 1.38. In geany 1.36 everything was ok.
The text was updated successfully, but these errors were encountered: