-
Notifications
You must be signed in to change notification settings - Fork 171
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
Left square bracket ([) not registered with Spanish keyboard #720
Comments
Thanks for the bug report. Do you have the ability to build neovim-qt from source? If so, can you please provide the debug output of the non-working key sequencing with the following lines un-commented. The code is found in // Uncomment for key input debugging and unit test writing.
// qDebug() << "QKeyEvent ev:" << ev;
// qDebug() << " " << inp; If you are unable to build |
The input layer was overhauled recently, so it is quite possible this is a regression. Once I have the I still need to work on Issue #683. However, windows does not provide a good mechanism for debug output. |
I followed the compile instructions from the wiki and got the build working. This is the message I got:
Let me know if I can help with anything else. |
Interesting... You are being impacted by the fix for Issue #170 Pull #682. I am not familiar with the Spanish keyboard. Could you provide some context for me as to which keys are being pressed and what you expect to occur? What happens in plain terminal On a US Layout keyboard, the |
The key has this behavior: Key: ` AltGr is a weird key; sometimes it's interpreted as CTRL+ALT and I think that's the case here. This is the log for the left curly brace character '{' that is also typed with AltGr:
Maybe the fix can be something along the lines of:
to exclude AltGr scenario from the fix for issue #170 ? |
if (isCaretKey && mod & ControlModifier() && !AltModifier()) { Yes, we will need to do something like this. Unfortunately, that will also introduce divergent behavior from It appears Qt has no abstraction for |
I'd also like to write explicit unit tests that cover all cases/modifier for this key in the Spanish Layout.
Could you confirm/provide the Key: ? Feel free to provide any other related sequences. More coverage in this area is always better. |
Keys ^ and ` do not print anything on their own; they don't produce any event until you press another key you want to modify (like 'e', printing 'è' or 'ê'). What I usually do is press the combination and then space (prints the symbol once) or press the same key combination twice (prints the symbol twice.) For some reason in neovim-qt the first option (key, then space) doesn't work and prints a space. This happens on all the keys with this behavior (^, `, ´, ¨) This looks like a different issue but I'm including the mappings for these scenarios too, just in case they are useful somehow. Key, then Space (prints space):
Key (twice) (prints symbol twice):
Shift + Key, then space (prints space):
Shift + Key (twice) (prints symbol twice):
AltGr + Key:
Ctrl + Shift + Key:
Key, then e:
Shift-Key, then e:
|
We're headed in the right direction. The input you provided is EXACTLY what I'm looking for. The Pull Request above is my understanding of each event you described. This is going to be tricky because the behavior you describe is not stateless like the current input design. We also need to verify Mac/Linux behave identically. A Few Questions:
Thank you for the detailed responses! Your help is greatly appreciated 👍 |
This sounds like a tricky scenario, yes. These keys are weird!
As far as I know, it looks good.
Currently it seems to be <C-^>. It does look like the right behavior but terminal neovim doesn't do that (it doesn't seem to do anything)
I don't have access to my dev computer right now so I can't check, but I remember that the control and shift keys were also logged in each relevant scenario. I think AltGr was not logged at all but not 100% sure. I'll be back home next week and will check to be sure.
I'm not, but I have a Mac and a Linux machine so I definitely can check next week once I get home 😄 |
Friendly 1-week ping, let me know when those Mac/Linux machines are available for testing 😄 I would like to understand how this behaves on those platforms before I go too far with writing a fix. Each platform handles these things differently, and that will likely influence the design. With these input bugs the hard part is getting good accurate test coverage. Writing the fix becomes trivial after that. |
Sorry for the delay, I've been away longer than I originally planned. I'll be back home on Wednesday and will work on this as soon as I arrive, promised! Anyway I borrowed a Macbook and tested the behavior. The good news is that the 'key, then space' behavior is not broken in the Mac app. The bad news: In the Mac keyboard there is no "Alt Gr" key, the equivalent behavior is with "Option." Option+Key doesn't work at all for any of the combinations I tried in neovim-qt, but all of them worked in terminal nvim. I don't mean only '[' but any character that requires pressing Option: @, #, [, ], {, }, none of them work :( Would it be useful if I compile the app for Mac uncommenting the log lines and provide the logged keys for the scenarios? |
Here is a more detail Windows key capture with all the modifier events and the expected output and a Mac key capture. Some of the keys in Mac worked correctly but I got no debug output. My Linux machine is toasted, I'll try to reinstall and see if I can fix it. The behavior should be the same than Windows but if I can I'll send you another set of key events. WindowsKey, then Space (Expected '`'):
Key (twice) (Works as expected):
Shift + Key, then space (Expected '^'):
Shift + Key (twice) (Works as expected):
AltGr + Key (Expected '['):
Ctrl + Shift + Key (Works as expected, I think):
Key, then e (Works as expected):
Shift-Key, then e (Works as expected):
MacKey, then Space (Works as expected): Key (twice) (Works as expected): Shift + Key, then space (Works as expected):
Shift + Key (twice) (Works as expected):
Option + Key (Expected '['):
Ctrl + Shift + Key (Not sure what to expect!):
Key, then e (Works correctly): Shift-Key, then e (Works correctly): |
By the way, in Mac no Option-key combination is working. These are the most common ones, in case it helps: Other keysOption + '+' (Expected ']'):
Option + 1 (Expected '|'):
Option + 2 (Expected '@'):
Option + 3 (Expected '#'):
Option + ` (Expected '{'):
Option + ç (Expected '}'):
Option + º (Expected ''):
|
@alfredobarroso I will update the UTs soon with some of these scenarios. Once I have that I will come up with a strategy for supporting this keyboard layout. |
Hello, I'm using Windows 10 and a Spanish keyboard and having the same behaviour writed by @alfredobarroso here : #720 (comment) I just want to add: Also, when I type "Altgr + 4 + Space" I only get a Space but if I type "(Altgr + 4) + key" I get "~key". The same behaviour happen if I delete my init.vim and ginit.vim, this only happen on nvim-qt, in nvim is fine. I'm using last Nvim (I installed it 2 days ago). I'm newbie to vim, nvim and first time using the comment section of github. My english is poorly. |
Thanks for the comment. I will re-evaluate this issue. I have avoided check-in because there is an issue we cannot completely solve: For now, the latest
No worries! Your English is MUCH better than my Spanish :) |
I can't get run that version of nvim-qt, say is missing 5 dll's: |
You can try the MSI or AppVeyor build: Sorry for the trouble... It looks like you're hitting something similar to #853. I'll take a look at the builds, and try to tweak this so |
thank you, the MSI build runs fine, i just test it and almost everything is working fine. I just note that all the keys who waits for a key e.g Anyway pressing |
I'm observing the same behaviour as @freakMCD on Windows 10. I have installed neovim-qt through scoop. The build that comes with neovim in scoop's main repository. It can be dealt with, but it's and odd behaviour for a character so common as |
I'm on macOS with a Spanish keyboard too, and I realized can't type If there is any way I can help speed up the resolution of this issue, I'll be delighted to help. I absolutely love the no nonsense approach of neovim-qt and I'd love to use it in my daily work. |
I'm facing the same issue, AltGr+4+` (^) seems to work but not ideal |
I just moved from Vim to Neovim and suddenly I had this issue. Any news on this problem? is there a way to tweak it in the configuration files? |
Can you open a separate issue for that problem? I'll also need some information to fix the issue, see the second comment above. I need the |
I've been stalling on this -- Unfortunately, I have not found a good way to differentiate non-Spanish-Layout users inserting sequences like My concern was checking in #721 will prompt the inverse issue: Why does my mapping for I'll take another look. |
Hi for you to know, I have |
I've recently installed the latest release of neovim-qt (v0.2.16.1) and the character '[' is no longer registered when pressed. This didn't happen in my old version (v0.2.13)
I've checked to make sure it's not a plugin or remapping problem; the only factor that impacts the issue seems to be the version of neovim-qt.
The text was updated successfully, but these errors were encountered: