Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Can't use backspace #369

Open
1 task
SirCipherz opened this issue Nov 20, 2020 · 12 comments
Open
1 task

Can't use backspace #369

SirCipherz opened this issue Nov 20, 2020 · 12 comments
Labels
bug Something isn't working

Comments

@SirCipherz
Copy link

How have you installed cordless

  • git clone & go build .

How do you reproduce this bug

I can't delete characters while typing my message with the backspace key, but the Delete key still works

System information

Key Value
OS Gentoo
Architecture amd64
Terminal xterm vt340
Go version 1.15.5
@Bios-Marcel Bios-Marcel added the bug Something isn't working label Nov 20, 2020
@Bios-Marcel
Copy link
Owner

Probably a regression, will check it out later today.

@Bios-Marcel
Copy link
Owner

Bios-Marcel commented Nov 20, 2020

Mind telling me which terminal emulator exactly you use? Oh and can I get your shortcuts.json please?

@SirCipherz
Copy link
Author

Mind telling me which terminal emulator exactly you use? Oh and can I get your shortcuts.json please?

[ { "Identifier": "quote_selected_message", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 113 }, { "Identifier": "edit_selected_message", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 101 }, { "Identifier": "dowbload_message_files", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 100 }, { "Identifier": "reply_selected_message", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 114 }, { "Identifier": "new_direct_message", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 112 }, { "Identifier": "copy_selected_message_link", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 108 }, { "Identifier": "copy_selected_message", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 99 }, { "Identifier": "toggle_selected_message_spoilers", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 115 }, { "Identifier": "delete_selected_message", "ScopeIdentifier": "chatview", "EventKey": 271, "EventMod": 0, "EventRune": 0 }, { "Identifier": "view_selected_message_images", "ScopeIdentifier": "chatview", "EventKey": 256, "EventMod": 0, "EventRune": 111 }, { "Identifier": "selection_up", "ScopeIdentifier": "chatview", "EventKey": 257, "EventMod": 0, "EventRune": 0 }, { "Identifier": "selection_down", "ScopeIdentifier": "chatview", "EventKey": 258, "EventMod": 0, "EventRune": 0 }, { "Identifier": "selection_top", "ScopeIdentifier": "chatview", "EventKey": 268, "EventMod": 0, "EventRune": 0 }, { "Identifier": "selection_bottom", "ScopeIdentifier": "chatview", "EventKey": 269, "EventMod": 0, "EventRune": 0 }, { "Identifier": "expand_selection_word_to_left", "ScopeIdentifier": "multiline_text_input", "EventKey": 260, "EventMod": 1, "EventRune": 0 }, { "Identifier": "expand_selection_word_to_right", "ScopeIdentifier": "multiline_text_input", "EventKey": 259, "EventMod": 1, "EventRune": 0 }, { "Identifier": "select_all", "ScopeIdentifier": "multiline_text_input", "EventKey": 1, "EventMod": 2, "EventRune": 1 }, { "Identifier": "select_word_to_left", "ScopeIdentifier": "multiline_text_input", "EventKey": 260, "EventMod": 3, "EventRune": 0 }, { "Identifier": "select_word_to_right", "ScopeIdentifier": "multiline_text_input", "EventKey": 259, "EventMod": 3, "EventRune": 0 }, { "Identifier": "select_to_start_of_line", "ScopeIdentifier": "multiline_text_input", "EventKey": 268, "EventMod": 1, "EventRune": 0 }, { "Identifier": "select_to_end_of_line", "ScopeIdentifier": "multiline_text_input", "EventKey": 269, "EventMod": 1, "EventRune": 0 }, { "Identifier": "select_to_start_of_text", "ScopeIdentifier": "multiline_text_input", "EventKey": 268, "EventMod": 3, "EventRune": 0 }, { "Identifier": "select_to_end_of_text", "ScopeIdentifier": "multiline_text_input", "EventKey": 269, "EventMod": 3, "EventRune": 0 }, { "Identifier": "move_cursor_to_left", "ScopeIdentifier": "multiline_text_input", "EventKey": 260, "EventMod": 0, "EventRune": 0 }, { "Identifier": "move_cursor_to_right", "ScopeIdentifier": "multiline_text_input", "EventKey": 259, "EventMod": 0, "EventRune": 0 }, { "Identifier": "move_cursor_to_word_left", "ScopeIdentifier": "multiline_text_input", "EventKey": 260, "EventMod": 2, "EventRune": 0 }, { "Identifier": "move_cursor_to_word_right", "ScopeIdentifier": "multiline_text_input", "EventKey": 259, "EventMod": 2, "EventRune": 0 }, { "Identifier": "move_cursor_to_start_of_line", "ScopeIdentifier": "multiline_text_input", "EventKey": 268, "EventMod": 0, "EventRune": 0 }, { "Identifier": "move_cursor_to_end_of_line", "ScopeIdentifier": "multiline_text_input", "EventKey": 269, "EventMod": 0, "EventRune": 0 }, { "Identifier": "move_cursor_to_start_of_text", "ScopeIdentifier": "multiline_text_input", "EventKey": 268, "EventMod": 2, "EventRune": 0 }, { "Identifier": "move_cursor_to_end_of_text", "ScopeIdentifier": "multiline_text_input", "EventKey": 269, "EventMod": 2, "EventRune": 0 }, { "Identifier": "delete_left", "ScopeIdentifier": "multiline_text_input", "EventKey": 127, "EventMod": 0, "EventRune": 127 }, { "Identifier": "delete_right", "ScopeIdentifier": "multiline_text_input", "EventKey": 271, "EventMod": 0, "EventRune": 0 }, { "Identifier": "delete_word_left", "ScopeIdentifier": "multiline_text_input", "EventKey": 23, "EventMod": 2, "EventRune": 23 }, { "Identifier": "add_new_line_character", "ScopeIdentifier": "multiline_text_input", "EventKey": 13, "EventMod": 4, "EventRune": 13 }, { "Identifier": "copy_selection", "ScopeIdentifier": "multiline_text_input", "EventKey": 256, "EventMod": 4, "EventRune": 67 }, { "Identifier": "paste_at_selectiom", "ScopeIdentifier": "multiline_text_input", "EventKey": 22, "EventMod": 2, "EventRune": 22 }, { "Identifier": "send_message", "ScopeIdentifier": "multiline_text_input", "EventKey": 13, "EventMod": 0, "EventRune": 13 }, { "Identifier": "add_new_line_in_code_block", "ScopeIdentifier": "multiline_text_input", "EventKey": 13, "EventMod": 0, "EventRune": 13 }, { "Identifier": "exit_application", "ScopeIdentifier": "global", "EventKey": 3, "EventMod": 2, "EventRune": 3 }, { "Identifier": "focus_up", "ScopeIdentifier": "global", "EventKey": 257, "EventMod": 4, "EventRune": 0 }, { "Identifier": "focus_down", "ScopeIdentifier": "global", "EventKey": 258, "EventMod": 4, "EventRune": 0 }, { "Identifier": "focus_left", "ScopeIdentifier": "global", "EventKey": 260, "EventMod": 4, "EventRune": 0 }, { "Identifier": "focus_right", "ScopeIdentifier": "global", "EventKey": 259, "EventMod": 4, "EventRune": 0 }, { "Identifier": "focus_channel_container", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 0, "EventRune": 227 }, { "Identifier": "focus_user_container", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 0, "EventRune": 245 }, { "Identifier": "focus_guild_container", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 0, "EventRune": 243 }, { "Identifier": "focus_private_chat_page", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 0, "EventRune": 240 }, { "Identifier": "switch_to_previous_channel", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 4, "EventRune": 108 }, { "Identifier": "focus_message_input", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 4, "EventRune": 109 }, { "Identifier": "focus_message_container", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 4, "EventRune": 116 }, { "Identifier": "focus_command_input", "ScopeIdentifier": "global", "EventKey": -1, "EventMod": -1, "EventRune": -1 }, { "Identifier": "focus_command_output", "ScopeIdentifier": "global", "EventKey": -1, "EventMod": -1, "EventRune": -1 }, { "Identifier": "toggle_user_container", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 4, "EventRune": 85 }, { "Identifier": "toggle_command_view", "ScopeIdentifier": "global", "EventKey": 256, "EventMod": 4, "EventRune": 46 }, { "Identifier": "toggle_bare_chat", "ScopeIdentifier": "global", "EventKey": 2, "EventMod": 2, "EventRune": 2 }, { "Identifier": "guild_mark_read", "ScopeIdentifier": "guildlist", "EventKey": 18, "EventMod": 2, "EventRune": 18 }, { "Identifier": "channel_mark_read", "ScopeIdentifier": "channeltree", "EventKey": 18, "EventMod": 2, "EventRune": 18 } ]

xterm version 351 with vt340 option

@Bios-Marcel
Copy link
Owner

The man page doesn't mention how to enable vt340 mode. Mind helping me out? I don't really use xterm.

@SirCipherz
Copy link
Author

xterm -ti vt340

@Bios-Marcel
Copy link
Owner

Using the same shortcut as you and the same terminal+args, it works fine for me. What commit are you on?

@SirCipherz
Copy link
Author

66883c6

@Bios-Marcel
Copy link
Owner

Hm, I am sorry, but as I can't reproduce it, can you look into it?

@SirCipherz
Copy link
Author

I'll

@SirCipherz
Copy link
Author

So, I checked with another keyboard what was the backspace key ID it was "7002a" and on my laptop it was "0e"

@Bios-Marcel
Copy link
Owner

What's more interesting, is the output that tools/keyevents/main.go gives for each of the keys on both machines.
I don't really know what "7002a" is supposed to mean.

@jdw1023
Copy link

jdw1023 commented Dec 13, 2020

So, I checked with another keyboard what was the backspace key ID it was "7002a" and on my laptop it was "0e"

0x07 is the code for Keyboard page in USB HID Usage Codes and 0x2A is the HID Usage ID for backspace. They are sometime written together as 0x0007002A.
0x0E is the "XT" ("set 1") scancodes for backspace.

https://deskthority.net/wiki/Scancode
USB HID to PS/2 Scan Code Translation Table: https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants