lbonn / rofi

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support
Other
927 stars 36 forks source link

[BUG] doesn't respect keyrate set in sway #81

Open rj1 opened 1 year ago

rj1 commented 1 year ago

Rofi version (rofi -v)

1.7.5+wayland1

Configuration

https://gist.github.com/rj1/abf4940b9997aba4ac6c95556c71c5a0

Theme

https://gist.github.com/rj1/4a82d33fc9d65c8247a25f9329e843ae

Timing report

No response

Launch command

rofi -show run

Step to reproduce

Expected behavior

fast keyrate

Actual behavior

slow (default?) keyrate

Additional information

i set my keyrate in my sway config:

input "type:keyboard" {
    xkb_layout us
    repeat_delay 250
    repeat_rate 60
    xkb_options caps:escape
}

all software i use follows the set keyrate, except for rofi. very noticeable when backspacing a large amount of text (i use rofi for password management, gpg pinentry, etc.)

c0001 commented 10 months ago

Either here, the repeated key stroking is too slow where its repeat rate seems hard coded in source?

lbonn commented 10 months ago

Actually I just tested this and unfortunately cannot reproduce the issue. Both with input "type:keyboard" and using explicit keyboard identifiers, I am able to modify the rate and delay.

This is set here from the information given by sway https://github.com/lbonn/rofi/blob/9d11a2b4a9095b3f0a092155f749900f7eb8e047/source/wayland/display.c#L475.

Do you have more information on both of your setups? Like sway version, several keyboards etc...

BarePotato commented 1 month ago

I too have a slow repeat rate in rofi-wayland, that to the best of my memory was there in rofi on X, and was present when this fork was only on the AUR.

I am running Sway 1.9 in 6.9.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 18 Jul 2024 18:06:13 +0000 x86_64 GNU/Linux.

I only use one keyboard generally, a wired Anne Pro 2, and again to the best of my memory, this issue was also present with my Logitech G610.

I set my repeat in the Sway config as one might expect as such:

input type:keyboard {
    repeat_delay 195
    repeat_rate 100
}

As you can see, I use a rate and delay on the more aggressive side and in rofi it is quite slow. I have not noticed any other software with a slow repeat rate. Attachment should show what is expected versus what I am getting.

https://github.com/user-attachments/assets/e8057648-3d47-4adb-bf50-9b1b9b7821b5

Config:

@theme "dumped.rasi"
configuration {
    modes: "window,drun,run,calc,filebrowser,ssh";
    kb-remove-char-back: "BackSpace,Shift+BackSpace";
    kb-remove-to-eol: "";
    kb-accept-entry: "Control+m,Return,KP_Enter";
    kb-mode-complete: "";
    kb-row-up: "Up,Control+p,Control+k";
    kb-row-down: "Down,Control+n,Control+j";
    kb-page-prev: "Control+h,Page_Up";
    kb-page-next: "Control+l,Page_Down";
  timeout {
      action: "kb-cancel";
      delay:  0;
  }
  filebrowser {
      directories-first: true;
      sorting-method:    "name";
  }
}