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

Dead keys not working in normal mode #760

Open
fpiem opened this issue Oct 29, 2021 · 2 comments
Open

Dead keys not working in normal mode #760

fpiem opened this issue Oct 29, 2021 · 2 comments
Labels
category: localisation Issues regarding language and keyboard compatibility

Comments

@fpiem
Copy link

fpiem commented Oct 29, 2021

Hello,

I'm running VSCodeNeovim in PopOS 21.04, and using the US International keyboard layout (with dead keys). I'm finding some strange behavior when typing dead keys in Normal mode. For instance, say I have the line below (| represents the cursor):

stri|ng =  'hello world'

Using dead keys, typing ' requires pressing the ' key on the keyboard and then space. If I press f' (but not space) the following line is displayed on screen:

stri´ng =  'hello world'

with the ´ character appearing where the cursor would be. If I then type space I get:

str'|ng =  'hello world'

so the cursor doesn't move, and the previos character is replaced by the key I was trying to type. The same issue occurs when typing any character bound to dead keys (", ^, `, etc), breaking many normal mode commands. I think this may have something to do with the dead key previews which appear on screen in Ubuntu/Pop when typing only the first half of a dead key combo, but I could not find a way to disable them.

For reference, in regular NeoVim in the terminal, I get the desired output of:

string =  |'hello world'

Also in regular NeoVim, if I type ^ (but not space) the following:

str^ng =  'hello world'

but if I then type space I go to the start of the line as expected.

I'm not too sure what's happening, I'm thinking VSCodeNeoVim is failing to "correct" the dead key preview when space is pressed? This is a total guess though. I've tried setting the Keyboard: Dispatch setting in VSCode to both code and keyCode to no effect.

Any help would be greatly appreciated.

@theol0403 theol0403 added the category: localisation Issues regarding language and keyboard compatibility label Apr 29, 2022
@Sudakatux
Copy link

Im having the same problem. is there any work arround

@fpiem
Copy link
Author

fpiem commented May 20, 2022

Hey @Sudakatux, in the end I was able to get around this issue with the following command (requires IBus):

dbus-send --bus="`ibus address`" --print-reply --dest=org.freedesktop.IBus /org/freedesktop/IBus org.freedesktop.DBus.Properties.Set string:org.freedesktop.IBus string:EmbedPreeditText variant:boolean:false > /dev/null

To be completely honest, I'm not quite sure what it does, but maybe it will for you as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: localisation Issues regarding language and keyboard compatibility
Projects
None yet
Development

No branches or pull requests

3 participants