Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Holding down a key doesn't repeat it (on 0.3.0 with osx) #1545

Closed
magopian opened this issue Feb 13, 2018 · 12 comments
Closed

Holding down a key doesn't repeat it (on 0.3.0 with osx) #1545

magopian opened this issue Feb 13, 2018 · 12 comments

Comments

@magopian
Copy link

Hi!

I've just learned about oni and wanted to give it a try, and it's awesome!

I believe I've hit a bug where holding down a key doesn't repeat it. This occurs in normal mode (eg if I press "j" to scroll down the document, it only goes down one line) and in insert mode (holding down a key will just print this letter once, not a bunch of times).

I'm on Oni v0.3.0 on OSX (high sierra 10.13.3)

Please let me know if there's anything I can do to help investigate this matter!

@oni-bot
Copy link

oni-bot bot commented Feb 13, 2018

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

@magopian
Copy link
Author

This seems to only happen with letters, not with arrows. Pressing the down arrow will scroll down until I lift my fingers.

This could be because the keyboard is "clever", and when I press a key in insert mode, it opens a "smart keyboard" to let me choose how I want to accentuate the letter, or if I want to enter a number:
screen shot 2018-02-13 at 15 55 59

This bug might only be relevant to OSX, and might need to disable that smart keyboard at the system level?

@CrossR
Copy link
Member

CrossR commented Feb 13, 2018

Odd! Thats very basic vim functionality...

Are you using any custom config in Oni?

Other thing that could be useful is a screen shot of the debug log after you've held down a key.
If you do <Meta+Shift+P> and select "Open Dev Tools", you'll get the standard Chrome developer tools.
Put Oni.log.enableDebugLogging() in to the console and you should start getting debug logs, including keycodes.

What we'd expect to see is something like below, where we get multiple i KeyEvents, since I'm holding down i.
image

@magopian
Copy link
Author

Well, it was indeed an OSX issue: see https://stackoverflow.com/a/39977374

I'm not sure what's the proper "name" I should use for onivim if I wanted to disable it only for that application though... anyway, I'm closing this now as it's unrelated to onivim.

@TalAmuyal
Copy link
Collaborator

TalAmuyal commented Feb 13, 2018

Wow, that's a bad one.
Reminds me of Windows' "Sticky keys".
@bryphe do you think it should be in Oni's configuration or installation docs?
(Personally, I am not a Mac user so hard for me to tell if it's a common issue or how it should be handled)

@bryphe
Copy link
Member

bryphe commented Feb 13, 2018

Ah ya, I wish there was a way we could set this up automatically - it's a pain point for sure on first run in OSX.

We have a brief blurb in our Installation Guide for Mac -:


Download Oni for Mac

  • Double-click on the archive to expand
  • Drag Oni.app to the Applications folder

To enable key repeat when pressing & holding a key in Oni, write the following in your terminal:

defaults write com.extropy.oni ApplePressAndHoldEnabled -bool false

You can invoke oni from your terminal after adding it to your PATH, through CMD-Shift-P > Add to Path


But perhaps there is a place where we can put it more prominently? Or maybe something to add to the 'welcome' screen in OSX, once we have it?

@magopian
Copy link
Author

I admit I totally missed this installation guide: I went to the releases page (from the Download link on the website) and downloaded the osx package, without going through the installation link listed below the screenshot :/

Also, I'm not sure about that "add to your PATH" note: CMD-Shift-P doesn't do anything on my terminal, maybe I'm missing something (I'm launching oni through spotlight search or using the icon I added to the dock)

@bryphe
Copy link
Member

bryphe commented Feb 13, 2018

I admit I totally missed this installation guide: I went to the releases page (from the Download link on the website) and downloaded the osx package, without going through the installation link listed below the screenshot :/

Ah ya, we need to do a better job streamlining this. It used to be that Github put the downloads after the description, but now that they are at the top, it's easy to miss!

Also, I'm not sure about that "add to your PATH" note: CMD-Shift-P doesn't do anything on my terminal, maybe I'm missing something (I'm launching oni through spotlight search or using the icon I added to the dock)

You'll need to run Command+Shift+P in Oni - which brings up the command palette - and then it has the option to 'Add to Path'.

screen shot 2018-02-13 at 10 03 03 am

@tom-james-watson
Copy link
Contributor

I don't think

defaults write com.extropy.oni ApplePressAndHoldEnabled -bool false

is a proper solution. I need to write in both Spanish and English and use this feature a lot when writing non-code text, so I can't disable it.

In regular neovim I can hold down keys fine without the character accent menu appearing.

@tom-james-watson
Copy link
Contributor

Looks like there's a relevant open issue at #1888

@EarthCitizen
Copy link

EarthCitizen commented Jun 17, 2018

I am running macOS and I do not have this problem with vimR nor with Atom (also Electron-based). I only have this problem with Oni. So, I don't think this is an issue with the configuration of macOS.

@polikeiji
Copy link

defaults write com.extropy.oni ApplePressAndHoldEnabled -bool false

I tried the above solution but I can't hold down key on oni... I think it isn't the solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants