joplin icon indicating copy to clipboard operation
joplin copied to clipboard

Couldn't use backspace in command mode.

Open JiagengDing opened this issue 3 years ago • 10 comments

Environment

Joplin version: Joplin 1.6.3 Platform: terminal Joplin in macOS macOS 11.2

JiagengDing avatar Jan 17 '21 14:01 JiagengDing

Yes I just can't figure out why it happens and I can't replicate it in dev mode, which makes it very hard to fix. For now, you can use Ctrl+H

laurent22 avatar Jan 17 '21 16:01 laurent22

This is a weird one. e.g. backspace works when ssh'ing to my Linux server and running joplin there. When I run Joplin cli on my macOS, I have a problem with backspace.

I think it's a combination of the terminal (esc seq sent by backspace) and the new terminal kit module.

tessus avatar Jan 17 '21 20:01 tessus

Thanks to Joplin for providing a lot of help for my study.

Thank you for your reply too, but I couldn't delete a char with Ctrl+h in command mode. When I press it, Joplin will go back to normal mode. Should I configure it?

JiagengDing avatar Jan 18 '21 12:01 JiagengDing

Yes I just can't figure out why it happens and I can't replicate it in dev mode, which makes it very hard to fix. For now, you can use Ctrl+H

Thank you , Cmd+h works, but the backspace does not

v1sion avatar Feb 16 '21 23:02 v1sion

I was able to get this working by checking out this: https://stackoverflow.com/questions/13017392/how-to-make-iterm2-send-control-h-for-backspace-so-it-works-for-all-linux-shells#13017432 —The comment under the answer works for iTerm2. The question contains a fix for macOS Terminal (which I did not try).

amcooper avatar Mar 16 '21 22:03 amcooper

I was able to get this working by checking out this: https://stackoverflow.com/questions/13017392/how-to-make-iterm2-send-control-h-for-backspace-so-it-works-for-all-linux-shells#13017432 —The comment under the answer works for iTerm2. The question contains a fix for macOS Terminal (which I did not try).

Thank you, backspace could work in command mode after I change this.

iTerm2 -> Preference -> keys -> key bindings -> add -> press backspace -> select 'Send ^H Backspace

JiagengDing avatar Mar 20 '21 16:03 JiagengDing

Still not sure why this happened "all of a sudden". It has worked for me for a long time. Then at one point, it didn't. This is why I think it has something to do with terminal-kit. Upstream issue?

Let's leave this open for now.

tessus avatar Mar 20 '21 16:03 tessus

Still not sure why this happened "all of a sudden". It has worked for me for a long time. Then at one point, it didn't. This is why I think it has something to do with terminal-kit. Upstream issue?

I don't get it either as we aren't changing the CLI app much, so indeed it could be some lib that changed under us, or maybe Node that works differently. It would surprise me if it was a change in terminal-kit as we're on such an old version of it, it's unlikely it would have received an update. We're on 1.13.11, and it could have been automatically updated to 1.13.13, but that's still a 4 years old version so we've probably been using it for a while.

In fact, maybe it's a matter of upgrading terminal-kit to the latest version, as it could come with a fix for this issue.

laurent22 avatar Apr 11 '21 09:04 laurent22

I was able to get this working by checking out this: https://stackoverflow.com/questions/13017392/how-to-make-iterm2-send-control-h-for-backspace-so-it-works-for-all-linux-shells#13017432 —The comment under the answer works for iTerm2. The question contains a fix for macOS Terminal (which I did not try).

Thank you, backspace could work in command mode after I change this.

iTerm2 -> Preference -> keys -> key bindings -> add -> press backspace -> select 'Send ^H Backspace

For me, this breaks backspace completely. iTerm 3.4.4

jottr avatar Apr 19 '21 13:04 jottr

I just fixed this for the macOS default terminal. Add the last entry below on the Keyboard tab of your Profile. It was driving me nuts!

Screenshot 2022-09-15 at 11 24 01

matthewblott avatar Sep 15 '22 10:09 matthewblott