hismailbulut / Neoray

Simple and lightweight GUI client for Neovim
MIT License
148 stars 5 forks source link

Doesn't obey xkb options #26

Closed cbrst closed 3 years ago

cbrst commented 3 years ago

Describe the bug

Neoray does not obey my swapped capslock and control keys. Keybindings with C- do not work with capslock, but with the actual Ctrl key. Which then also toggles capslock.

Steps to reproduce

In terminal, execute:

dconf write /org/gnome/desktop/input-sources/xkb-options "['ctrl:swapcaps']"

Now the left Ctrl key should act as CapsLock, CapsLock should act as Ctrl.

In neoray, CapsLock does nothing, LCtrl acts as both Ctrl and CapsLock.

Your neoray config in init.vim (Only the part that concerns neoray!)

Tested with a clean config directory.

Debug output (you can generate starting neoray with --verbose option)

[DEBUG] [NVIM] Neovim started with command: nvim --embed
[TRACE] [NVIM] Neovim version 0.5.1
[TRACE] [NEORAY] Glfw version: 3.3.4 X11 GLX EGL OSMesa clock_gettime evdev
[DEBUG] [NEORAY] Monitor count: 1 Selected monitor: XWAYLAND0
[DEBUG] [NEORAY] Video mode &{Width:1366 Height:768 RedBits:8 GreenBits:8 BlueBits:8 RefreshRate:60}
[DEBUG] [NEORAY] Glfw window created with size 800 600
[DEBUG] [NEORAY] Window content scale is: 1.00, 1.00
[DEBUG] [NEORAY] Input callbacks are initialized.
[DEBUG] [RENDERER] Initializing opengl.
[TRACE] [RENDERER] Opengl Version: 4.5 (Core Profile) Mesa 21.2.3
[DEBUG] [RENDERER] Vendor: Intel Open Source Technology Center
[DEBUG] [RENDERER] Renderer: Mesa DRI Intel(R) HD Graphics 4400 (HSW GT2)
[DEBUG] [RENDERER] GLSL: 4.50
[DEBUG] [NEORAY] Loading default font.
[DEBUG] [NEORAY] Default font loaded.
[DEBUG] [NVIM] Attached to neovim as an ui client.
[DEBUG] [NEORAY] Checking user options.
[DEBUG] [NVIM] Option CursorAnimTime is 0
[DEBUG] [NVIM] Option ContextMenuOn is false
[DEBUG] [NEORAY] Window is now visible.
[TRACE] [PERFORMANCE] Start time: 370.960171ms
[DEBUG] [NEORAY] Loading font JetBrainsMono with size 10.5
[TRACE] [NEORAY] Regular: JetBrainsMono-Regular.ttf
[TRACE] [NEORAY] Bold Italic: JetBrainsMono-BoldItalic.ttf
[TRACE] [NEORAY] Italic: JetBrainsMono-Italic.ttf
[TRACE] [NEORAY] Bold: JetBrainsMono-Bold.ttf
[TRACE] [NVIM] Neovim child process closed.
[TRACE] [PERFORMANCE] Program finished. Total execution time: 15.229577914s
[DEBUG] [NEORAY] Window destroyed.
[DEBUG] [NEORAY] Glfw terminated.
hismailbulut commented 3 years ago

This is because neoray activate/deactive modifiers on keypresses eg. Left ctrl always activate ctrl, doesn't obey system modifier settings for allowing more key combinations (Look issue #5). Solving this issue is easy but brokes ctrl alt key combinations. I need to rethink and rewrite entire input system which requires some time. Thanks for your patience.

hismailbulut commented 3 years ago

I tried to fix this issue with an easy way, but not tested yet. Please try with latest patch and report to me.

cbrst commented 3 years ago

Thank you for the fix, it works now.