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

[BUG] Unable to set a keybinding on Control l #139

Closed
2 tasks done
doc-ar opened this issue Jul 20, 2024 · 3 comments
Closed
2 tasks done

[BUG] Unable to set a keybinding on Control l #139

doc-ar opened this issue Jul 20, 2024 · 3 comments
Labels

Comments

@doc-ar
Copy link

doc-ar commented Jul 20, 2024

Rofi version (rofi -v or git commit in case of build issue)

1.7.5 wayland3

Configuration

https://gist.github.com/doc-ar/a393b0c1a53bd9ddd8f5a85c026552f0

Theme

https://gist.github.com/doc-ar/a393b0c1a53bd9ddd8f5a85c026552f0

Timing report

No response

Launch command

rofi -show drun -show-icons

Step to reproduce

Step 1

Add the following vim style keybindings to ~/.config/rofi/config.rasi

  kb-row-up:                      "Up,Control k,Shift Tab,Shift ISO_Left_Tab";
  kb-row-down:                    "Down,Control j";
  kb-accept-entry:                "Control m,Return,KP_Enter";
  kb-remove-to-eol:               "Control Shift e";
  kb-mode-next:                   "Shift Right,Control Tab,Control l";
  kb-mode-previous:               "Shift Left,Control Shift Tab,Control h";
  kb-remove-char-back:            "BackSpace";

Step 2

Run rofi launch command

Expected behavior

Rofi runs as usual and i can navigate using the vim style bindings I configured.

Actual behavior

Rofi generates an error window. The error is attached in screenshot

image

Additional information

For the time being I am using Control semicolon for the next mode keybinding. However it doesn't come very natural since i'm so used to moving right with the L key in vim.

I am using the config and theme file from this repo.

At first I thought that that it might be mapped elsewhere in the configurations. I have checked both the config file and the theme file but control l is not mapped anywhere else.

Just in case I search for all the .rasi files using sudo find / -type f -name "*.rasi" in my machine and all of them are theme files

Using wayland display server protocol

  • Yes, I use rofi with wayland support

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version
@doc-ar doc-ar added the bug label Jul 20, 2024
@doc-ar doc-ar changed the title [BUG] [BUG] Unable to set a keybinding on Control l Jul 20, 2024
@lbonn
Copy link
Owner

lbonn commented Jul 20, 2024

It says it in your screenshot, run rofi -list-keybindings. Then probably, you will have this lines coming from the defaults: kb-mode-complete - Control l.

Please re-open if it persists

@lbonn lbonn closed this as completed Jul 20, 2024
@doc-ar
Copy link
Author

doc-ar commented Jul 21, 2024

It says it in your screenshot, run rofi -list-keybindings. Then probably, you will have this lines coming from the defaults: kb-mode-complete - Control l.

rofi -list-keybindings just displays all keybindings that are available. It does not provide any information on where the bindings are set. As far as I have found from the rofi documentation, there is a system config file in /etc/rofi.rasi. However in my case that file is empty.

So the only file where keybindings are set is ~/.config/rofi/config.rasi and that file has no other bindings set for kb-mode-complete

I moved all custom keybindings to /etc/rofi.rasi as follows:

configuration {
  kb-row-up:                      "Up,Control k,Shift Tab,Shift ISO_Left_Tab";
  kb-row-down:                    "Down,Control j";
  kb-accept-entry:                "Control m,Return,KP_Enter";
  kb-remove-to-eol:               "Control Shift e";
  kb-mode-next:                   "Shift Right,Control Tab,Control l";
  kb-mode-previous:               "Shift Left,Control Shift Tab,Control h";
  kb-remove-char-back:            "BackSpace";
}

The issue still persists.

@doc-ar
Copy link
Author

doc-ar commented Jul 21, 2024

I somehow fixed this problem but I don't understand how it works. First i checked rofi -help to see all the keybinds, in there the kb-mode-complete was listed as a default binding not a rasi file binding. Therefore, it doesn't make sense to disallow any other command using the same shortcut key.

First I tried to bind kb-mode-complete to other shortcuts like Control u or Control x that resulted in the same error. I tried to unbind it as well by doing kb-mode-complete: "" and that also didn't work.

I finally tried to bind kb-mode-complete to Control 8 and that somehow worked. If anyone has any insight on what the problem could be please share here. Thank you.

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

No branches or pull requests

2 participants