Open cqexbesd opened 8 months ago
^H
is ignored, becuase the search input field is manually implemented. If you press ^H
(Control + H), then it's interpreted as such - a keyboard shortcut.
Can you please run Contour with the following CLI args: contour debug gui.input,vt.input
and then press Backspace on your keyboard?
This is how it looks like for me:
[2023-12-01 20:06:28.372398583.372397] [gui.input] Key Press event received: Backspace
[2023-12-01 20:06:28.372576624.372576] [vt.input] Sending "Backspace" Press.
[2023-12-01 20:06:28.575200045.575199] [gui.input] Key Release event received: Backspace
Surprisingly (?) for me, pressing Backspace key in the search field, in order to delete the character left to the cursor, is actually working.
The reason why Ctrl+U is working for you, is, because I manually implemented that (because I use that a lot myself:D).
I would like to understand why you probably won't get "Backspace" events (as I posted in the logs above) rather than working around it without understanding why our two systems differ.
Can it be that you're building against Qt5 while I am using Qt6?
Debug[default]: sendKeyEvent: 16777219 "\b" QFlags<Qt::KeyboardModifier>(NoModifier) ((null):0, (null))
[2023-12-01 21:59:43.273265039.273264] [gui.input] Key Press event received: Backspace
[2023-12-01 21:59:43.273314683.273314] [vt.input] Sending raw input to stdin: \x08
Debug[default]: sendKeyEvent: 16777219 "\b" QFlags<Qt::KeyboardModifier>(NoModifier) ((null):0, (null))
[2023-12-01 21:59:43.386451039.386450] [gui.input] Key Release event received: Backspace
So my BS key sends the ASCII BS - but yours sends "Backspace" - is this an extended keyboard mode thing? ^BS sends 7f (ASCII DEL) but if you have to handle each character I guess it sort of makes sense that moves the cursor on the screen but not internally.
(update: according to od
when Contour says its sending Backspace
things are receiving DEL(7f) and if I press Delete
it sends some escape sequence. stty says erase is ^H (ASCII BS) so maybe the search field should respect the termios settings? Sending BS or DEL is complicated I know)
As an experiment I bound Backspace to Backspace in my config and the log now looks like:
Debug[default]: sendKeyEvent: 16777219 "\b" QFlags<Qt::KeyboardModifier>(NoModifier) ((null):0, (null))
[2023-12-01 22:07:35.708984434.708984] [gui.input] Key Press event received: Backspace
[2023-12-01 22:07:35.709484950.709484] [vt.input] Sending "Backspace" Press.
Failed to open VDPAU backend libvdpau_radeonsi.so: cannot open shared object file: No such file or directory
Debug[default]: sendKeyEvent: 16777219 "\b" QFlags<Qt::KeyboardModifier>(NoModifier) ((null):0, (null))
[2023-12-01 22:07:35.797433080.797432] [gui.input] Key Release event received: Backspace
Backspacing in search now works, though the shared library error was unexpected.
ldd says I'm using QT6.
Ok, let me simply also act on \x08
then. I'll keep you posted. Thx :)
Contour Terminal version
0.4.0-master-9c3073db
Installer source
Github: source code cloned
Operating System
Arch Linux as of a few days ago
Architecture
x86-64
Other Software
No response
Steps to reproduce
Expected Behavior
Backspace would delete single characters
Actual Behavior
Nothing happens when pressing backspace (
Debug[default]: sendKeyEvent: 16777219 "\b" QFlags<Qt::KeyboardModifier>(NoModifier) ((null):0, (null))
).^BS seems to move the cursor forward (
Debug[default]: sendKeyEvent: 16777219 "\b" QFlags<Qt::KeyboardModifier>(ControlModifier) ((null):0, (null))
) though if you later type a regular character the cursor jumps back to where it was.^H seems to be ignored (
[error] ViInputHandler: Receiving control code Control+0x48 in search mode. Ignoring.
).Additional notes
No response