Oni: Holding down a key doesn't repeat it (on 0.3.0 with osx)

Created on 13 Feb 2018  路  12Comments  路  Source: onivim/oni

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!

Most helpful comment

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?

All 12 comments

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.

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?

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 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

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.

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)

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?

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)

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

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.

Looks like there's a relevant open issue at https://github.com/onivim/oni/issues/1888

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.

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.

Was this page helpful?
0 / 5 - 0 ratings