Skip to content
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

issue on fast keyboard repeat rate or delay on cursor move #126

Closed
shohey1226 opened this issue Sep 7, 2018 · 8 comments
Closed

issue on fast keyboard repeat rate or delay on cursor move #126

shohey1226 opened this issue Sep 7, 2018 · 8 comments
Labels

Comments

@shohey1226
Copy link
Contributor

First of all, thank you for this amazing app.
I have a question that I could not solve by myself.

I started to use vim trough ttyd and found some delay issue on key repeat.
When I press "j" to move and could not place the cursor to the right place.
I also can see this behavior on terminal, for example, keep pressing down a key and press up, then the keys are pushed with slight delay. (I don't see this through ssh)
When I change key repeat to fastest, the behavior is obvious.

May I know where I should check to solve this? browser's key repeat looks good to me. This kind of issue has not reported on xtermjs..

Thank you in advance.

@tsl0922 tsl0922 added the bug label Sep 7, 2018
@tsl0922
Copy link
Owner

tsl0922 commented Sep 7, 2018

EDIT: I'm sorry, key repeat rate is slow by default on macOS, it works fine after I changed the repeat rate:

defaults write -g ApplePressAndHoldEnabled -bool false
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)

Reproduced (on Safari, macOS 10.13.6 ).

This issue seems to be introduced in the 1.4.1 release, I will prepare a fix later. Meanwhile, you can use the 1.4.0 release.

@shohey1226
Copy link
Contributor Author

shohey1226 commented Sep 8, 2018

Thank you for checking this. I use forked master on Aug 10th(only html change) on Ubuntu. It looks the same on ChromeOS. The key repeat can be fast on both OS.

I checked 1.4.0 and looks good.

@tsl0922
Copy link
Owner

tsl0922 commented Sep 9, 2018

@shohey1226 Can you try if the latest master works better?

@shohey1226
Copy link
Contributor Author

@tsl0922 Thank you. It's better but 1.4.0 of cursor move on vim is still smoother than 1.4.1. For example, cursor block on 1.4.0 is rendered every time it moves, whereas on 1.4.1, cursor block is not rendered every time and skipped some, which makes me difficult to stop in the right place.

@tsl0922
Copy link
Owner

tsl0922 commented Sep 9, 2018

EDIT 2: tested the C code on the master branch with the index.html from 1.4.0, it works good! Confirmed this is not a backend issue.

EDIT: tested against the xterm.js version of 1.4.0, it delays ,too (Sorry, I didn't downgrade xterm.js successfully at this time).

The Websocket backend on master is faster than 1.4.0 according to my tests, I'm not sure if this is a xterm.js issue. And, if I disable all the vim plugins, it renders incredibly fast on the web.

@tsl0922
Copy link
Owner

tsl0922 commented Sep 9, 2018

@shohey1226 I've downgraded xterm.js, it should works like 1.4.0 now, can you try the latest master again? Thanks.

tsl0922 added a commit that referenced this issue Sep 9, 2018
@shohey1226
Copy link
Contributor Author

@tsl0922 I've compared xtermjs 3.3.0's commit and master(xterm 3.7.0) and I don't see much difference. Most likely the fix you made for this makes cursor move fast and my eyes can't catch up with the move. I think this issue has been resolved. Thank you very much for the quick fix.

@tsl0922
Copy link
Owner

tsl0922 commented Sep 12, 2018

Released 1.4.2 with this fix included.

@tsl0922 tsl0922 closed this as completed Sep 12, 2018
depau pushed a commit to depau/wi-se-sw that referenced this issue Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants