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

Can't type backticks (`) #542

Closed
badosu opened this issue Jul 17, 2017 · 14 comments
Closed

Can't type backticks (`) #542

badosu opened this issue Jul 17, 2017 · 14 comments

Comments

@badosu
Copy link
Collaborator

badosu commented Jul 17, 2017

For some reason I can't type backticks, using oni from Arch User Repositories (aur/oni 0.2.5-1).

The input works on any other X window, just on Oni it does not work.

Let me know if additional info is required.

@bryphe bryphe added this to the 0.3 milestone Jul 17, 2017
@bryphe
Copy link
Member

bryphe commented Jul 17, 2017

Thanks for logging the issue! Sorry you hit this - that's bizarre (and frustrating)!

Tried this out, and I'm unable to reproduce on Ubuntu. I'll see if I can get an Arch Linux box to test it out there.

A couple of follow-up questions to narrow it down:

  • What does your config.js look like? Are you using a custom init.vim?
  • What keyboard layout are you using?

Thanks!

@badosu
Copy link
Collaborator Author

badosu commented Jul 17, 2017

Hello @extr0py, thanks for the helpful response!

My layout is set by: setxkbmap -model pc105 -layout br.

I am using a custom init.vim, however if I use a vanilla Oni setup:

module.exports = {
  //add custom config here, such as
  "oni.useDefaultConfig": true,
  "oni.loadInitVim": false,
  "oni.hideMenu": true,
  "editor.fontSize": "16px",
  //"editor.fontFamily": "Monaco"
}

The issue persists.

@Gahen
Copy link

Gahen commented Aug 28, 2017

Hi! I'm having the same issue with a spanish layout. It happens with several special characters (I first noticed it with ~ as right-alt + ¡), they are not written after pressing the same keys that work in the rest of my OS.

I'm using an updated Arch and kde.

@someguynamedmatt
Copy link
Contributor

@badosu Is this issue still present for you? I'm on Arch and I don't see it.

@bryphe
Copy link
Member

bryphe commented Sep 2, 2017

It looks like right now we are not handling 'Dead Keys' correctly, which might be related here. I see similiar issues with other keyboard layouts that have dead keys (like ~ in ENG INTL)

@badosu
Copy link
Collaborator Author

badosu commented Sep 13, 2017

@someguynamedmatt Yes, it's present. On a machine with a standard US keyboard layout it works though.

On the standard US keyboard there's a different issue though, I use the Compose key to type accentuated characters and it does not work.

I want to use Oni as my main editor and this is the most painful blocker atm.

@Gahen
Copy link

Gahen commented Sep 13, 2017

Just for the laughs: a few hours ago oni was ignoring my caps lock key. It gets the prize to the most weird bug I ever seen. Latam or spanish keyboard layout.

@bryphe
Copy link
Member

bryphe commented Sep 13, 2017

Sorry @badosu @Gahen I know these keyboard / input issues are brutal. I added the daily-editor-blocker tag, and these blockers for alternate keyboard layouts and input handling (dead keys, compose keys, AltGr, and IMEs) is top of my list to work on.

My time is limited for the next couple of weeks, but, I am going to be full-time on Oni for at least a couple of months starting in October, and these are top of my list to tackle once I make that switch... My top priority at that time is to tackle all the bugs stopping people from using Oni as their main editor!

In the meantime, let me know if there are any other weird things - knowing the OS, keyboard layout, and key sequence will be helpful - I'll add it to my list of test cases I'm tracking.

Just for the laughs: a few hours ago oni was ignoring my caps lock key. It gets the prize to the most weird bug I ever seen

@Gahen - that is bizarre! Appreciate you reporting it, though. Sounds like the keyboard is latin america/spanish, but which OS is this?

@badosu
Copy link
Collaborator Author

badosu commented Sep 13, 2017

@extr0py Thanks for the attentive response, gonna improve my error reports and follow-ups to help you dig into (what I think) are the most fundamental issues for an editor.

@Gahen
Copy link

Gahen commented Sep 13, 2017

@extr0py Thanks for the kind answer and the good work!

The caps lock bug was on my working machine, it's running Arch and using the compiled git version ( master branch from last week I think). If you can tell me how I can fetch more info for you I'll gladly do it and post it here tomorrow.

I work developing for web so I can easily check the dev tools if there is something that can be tested there.

Thanks again! This project rocks =)

PD: On my home machine the same OS / layout doesn't seem to have that bug. I think I checked and wasn't happening on NeoVim only, but I'll check that again tomorrow. The version is different though, I have the OS package version (aur/oni 0.2.8-1) and not the one from git.

@bryphe
Copy link
Member

bryphe commented Sep 14, 2017

Thanks @badosu & @Gahen for the support (& patience 😄 )

gonna improve my error reports and follow-ups to help you dig into (what I think) are the most fundamental issues for an editor.

That would be excellent! I'm building up a matrix of representative test cases so I can be sure I'm covering all the scenarios. Agree with it being a fundamental issue - stuff like LSP and nice tabs aren't very useful if you can't even input text...

I work developing for web so I can easily check the dev tools if there is something that can be tested there.

This would be great, @Gahen ! There's some information on how to debug Oni here: https://github.com/extr0py/oni/wiki/Debugging#debug-build

And how to open the dev tools: https://github.com/extr0py/oni/wiki/Debugging#open-devtools

The most interesting place to look at for the keyboard stuff is here:
https://github.com/extr0py/oni/blob/a9347b81c9749f9b14fa7a44eca255aa2f3bf65c/browser/src/Input/Keyboard.ts#L34

The very first fix that I'm looking thinking about is using evt.key instead of evt.keyCode, which is more modern and better handles some of the intl cases. Beyond that, just hooking a keydown handler on an element is really limiting in terms of handling dead-keys and IME, so I'd like to switch the input strategy to use a 'hidden' text field and handle the composition events and state.

For the caps issue, for example, it would be interesting to trace through that code and see if it is getting a preventDefault call somehow. I found the conditional breakpoint functionality in the Chrome developer tools really helpful for my debugging so far.

The version is different though, I have the OS package version (aur/oni 0.2.8-1) and not the one from git.

Interesting, there were a few keyboard fixes that came in between 0.2.8 and latest git I believe. There's also the possibility that there is some difference between building locally and the packaged version.

bryphe added a commit that referenced this issue Sep 28, 2017
* Refactor Keyboard to take in an element

* Extract body of keyboard handler to separate method

* Factor out keyboard to <NeovimInput />

* Refactor keyboard input to separate component

* More input updates

* Initial work to add IME/dead key handling to keyboard input

* Handle composing case

* TEST COMMIT

* Revert test commit

* Some cleanup / refactoring

* Fix first round of lint issues

* Disable IME when not in insert mode

* Fix remaining lint issues

* Refactor logic so that RootComponent gets first pass at handling keyboard input

* Start cleaning up logic in NeovimInput

* Add FocusManager

* Remove 'capture' concept from input manager

* Fix mouse regression by setting pointer-events: none

* Fix exception due to null key

* Factor KeyboardInput to separate file

* Fix up props

* Clean up and consolidate logic in KeyboardInput; fix lint erros

* Fix composition issue on OSX

* Specify lineheight for cursor, to center highlighted text
@bryphe
Copy link
Member

bryphe commented Oct 3, 2017

Fixed in the [v0.2.10] release, via PR #716, so I'll close this. Let me know if you're still seeing any issues though!

@bryphe bryphe closed this as completed Oct 3, 2017
@finex
Copy link

finex commented Mar 5, 2018

Hi, I'm trying onivim (v0.3.0) and it doesn't accept quotation mark ( " ) which needs a three keys combination. Other chars like ~ (just two key combination) works as expected. I'm using the following keyboard settings (Archlinux/KDE):

rules: evdev
model: pc105
layout: us
variant: intl
options: eurosign:

Please tell me if can give you more details. Thanks!

@badosu
Copy link
Collaborator Author

badosu commented Mar 5, 2018

@finex It seems your issue is unrelated to the original one for this issue, I created one to track this (#1713)

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

No branches or pull requests

5 participants