Add Shift-Page Up/Down keybindings#3407
Add Shift-Page Up/Down keybindings#3407dmaluka merged 4 commits intomicro-editor:masterfrom injust:shift-keybindings
Conversation
|
I was testing a bit but there were terminal emulators where Shift+PageUp/PageDown is not detected in micro. I do not know what terminal emulators are usually used, but I think it is fine adding Shift+PageUp/PageDown keybindings if it can be detected in some by default. Shift+PageUp/PageDown were detected in these terminal emulators:
The keys were not detected in these terminal emulators:
I have not used Alt+PageUp/PageDown much but the keys can be detected in all terminal emulators I tested. rxvt and xterm may be used a lot less than others. |
|
I think foot consumes Shift+Page Up/Down to scroll history (https://codeberg.org/dnkl/foot#normal-mode). My thought process is that the Shift modifier is conventionally used to modify a selection, i.e. when combined with the arrow keys and Home/End, as well as OS-native shortcuts to move the cursor to the previous/next word. So it's a reasonable default to have Shift work with Page Up/Down, too. It's unfortunate that some terminal emulators don't pass Shift+Page Up/Down to micro, but IMO having a reasonable default should be higher priority than compatibility with more terminal emulators. At the end of the day, it's up to the user to rebind their keybindings (whether it's in micro or their preferred terminal emulator). |
I think we have no dilemma here. Adding default bindings for Shift-PageUp/Down will not break compatibility with those terminals where these bindings don't work. They will just continue not working there. |
All of the other navigation keys (i.e. arrows and Home/End) have sane defaults for their respective Shift shortcuts. Page up/down should get some love too.