lite-xl / lite-xl

A lightweight text editor written in Lua
https://lite-xl.com
MIT License
4.55k stars 214 forks source link

custom XKB Keyboard layout support #1726

Open masugimyid opened 4 months ago

masugimyid commented 4 months ago

I use custom keyboard layout which map arrows to i j k l, home, end, page up and down to h ; u m, Remapped (non character) XKB keys dont do anything in lite-xl. It might have similiar problem with neo keyboard layout, which historically had similiar issues with vscode.

the custom keyboard respect XKB specs, so it works in any text area in browsers, or any native apps which considers XKB specs.

I dont really know if lite-xl considering XKB specs in its development, but remapped (non character) XKB keys dont do anything in lite-xl.

Maybe someone can explain how keys are processed ?

lite-xl and vscode side by side image

what it should be vscode lite-xl

text area lite-xl-vs-micro

micro (terminal editor) lite-xl-vs-micro-cli

Guldoman commented 4 months ago

What DE are you using? Could you also test in Wayland? Both using Lite XL under Xwayland, and with the environment variable SDL_VIDEODRIVER=wayland set.

istefani commented 2 days ago

I have exactly the same problem as @masugimyid. The neo2 keyboard layout and remapped keys don't work. Setting SDL_VIDEODRIVER results in the following (under Hyprland):

$ SDL_VIDEODRIVER=wayland lite-xl
Error getting window surface: Window framebuffer support not available⏎
$ SDL_VIDEODRIVER="wayland,x11" lite-xl
Error getting window surface: Window framebuffer support not available⏎
Guldoman commented 2 days ago

Error getting window surface: Window framebuffer support not available

This is an issue with the latest SDL release (see https://github.com/libsdl-org/SDL/issues/10155). Can be worked around with SDL_RENDER_DRIVER= SDL_VIDEODRIVER=wayland lite-xl.

istefani commented 1 day ago

Can be worked around with SDL_RENDER_DRIVER= SDL_VIDEODRIVER=wayland lite-xl.

Thank you! Lite XL starts up, but again it does not respect the configured XKB layout.