hyprlock icon indicating copy to clipboard operation
hyprlock copied to clipboard

hyprlock does not register numlock state

Open cafetestrest opened this issue 1 year ago • 3 comments

I run a command that puts PC to sleep:

systemctl suspend

afterwards I wait a 5 or so seconds to let my monitor go to sleep mode. After clicking on the PC power button, with hypridle example config from: https://wiki.hyprland.org/Hypr-Ecosystem/hypridle/ opens up hyprlock for me (lock before suspend).

At this moment whatever I do on the numpad does not get registered, it only does after I disable numlock and enable it again. It works find if I let hypridle put the PC to sleep by itself. Unsure if this is place to create this issue, if I need to create it/move it somewhere else please let me know.

I'm using Nixos with Hyprland, all from unstable branch.

cafetestrest avatar Jun 16 '24 18:06 cafetestrest

Same issue there, using latest Hyprlock & Hyprland from the AUR (Artix Linux with dinit).

Note: pressing Ctrl+Backspace or Ctrl+U makes the numpad work, but pressing ESC does not (clears the password buffer, see https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#keyboard-shortcuts-and-actions).

On my side, hyprlock registers the numpad state correctly when launched directly from the terminal, but it does not when Hyprland runs it (via exec-once).

marcb152 avatar Aug 09 '24 13:08 marcb152

I had the same issue and, after trying different methods, I found a solution that worked for me; just change the after_sleep_cmd in the general section of your hypridle.conf file as follow (assuming you have the numlock activated): after_sleep_cmd = hyprctl keyword input:numlock_by_default false && hyprctl keyword input:numlock_by_default true && hyprctl dispatch dpms on. This will deactivate and then reactivate the numlock before your display turns on, removing the need to do it manually. Hope this will help.

Soyadrul avatar Aug 14 '24 08:08 Soyadrul

@Soyadrul, your fix does not work for me on Nixos stable 24.05. Actually when I wake my PC from sleep, hyprlock opens but numpad numbers do not work, when I type my password and press numpad enter it crashes my system.

cafetestrest avatar Aug 14 '24 17:08 cafetestrest

Hi @PaideiaDilemma , Unfortunately it seems that this does not fix the issue for me. I'm running a script from AGS (Aylur's Gtk Shell) which runs: systemctl suspend

When I click power button on my PC, the Hyprlock appears but it does not take any numpad number key in effect (it works for numpad enter), but it does work if I toggle off and than toggle on numpad lock.

This is the hyprlock version that I'm using on my NixOS system: image

cafetestrest avatar Oct 28 '24 12:10 cafetestrest

Hmm probably a hyprland problem then. maybe https://github.com/hyprwm/Hyprland/issues/8288 is the same?

PointerDilemma avatar Oct 29 '24 13:10 PointerDilemma

Working fine for me as on Nixos 24.11 and Hyprland tag 0.45.2.

cafetestrest avatar Nov 30 '24 17:11 cafetestrest