Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S spice
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 34
    • Issues 34
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • spice
  • spice
  • Issues
  • #66

Closed
Open
Created Dec 18, 2021 by Alex Caston@alexcaston

CapsLock is sent twice when binded to ESC on the host.

I like to use Vim as my editor, so I always bind CapsLock to ESC on my system. However, there seems to be a frustrating bug on Spice regarding this:

Whenever I press CapsLock the key is sent to the guest as expected, but after a few seconds, the same keystroke is sent again to the guest. This is frustrating because if you exit insert mode (esc), move to a different line and enter insert mode again, it will send you back to normal mode after the CapsLock keystroke is resent.

I've attached a small video demonstrating the issue. Left terminal is running evtest on the host (Fedora 34), Right terminal is running evtest on the guest (ParrotOS). As you can see, there is a CAPS_LOCK keystroke being sent to the Guest, without the Host sending any input

spice-kvm-bug

I've traced back the issue to spice after following this guide on virt-manager repo. The same problem occurs on virt-manager and virt-viewer. If I change my settings to use VNC instead of Spice, the problem no longer occurs, however I prefer using Spice as my viewer because of the cool and useful feature of automatic resolution adjustment (even though I need to manually trigger it with a command), and because mouse doesn't work properly on vnc for me.

What I have tried:

  • Binding CapsLock to Esc on both the Guest and the Host causes the issue (current environment)
  • Binding CapsLock to Esc only on the Host causes the same issue.
  • Binding CapsLock to Esc only on the Guest fixes the issue, but CapsLock is also triggered on the Host even tho I'm sending it to the guest. (This is not a real fix for me because I would prefer to bind CapsLock to ESC on both Host and Guest, as I rarely use CapsLock and I dont really like it being enabled)
  • Leaving CapsLock key as default doesn't causes any double-sent keystrokes, however, as mentioned above, this is not a real fix for me, because I need it to be binded to Esc)
  • Stopping spice-vdagentd dont fix the issue
  • Stopping qemu-ga dont fix the issue
  • Changing Spice to use OpenGL dont fix the issue and raises a new Selinux warn about execmem

I'm currently binding CapsLock to Esc using "xmodmap ~/.Xmodmap" where ~/.Xmodmap is a file containing the following rules:

clear Lock
keycode 0x42 = Escape

Versions

  • Host kernel: 5.15.6-100.fc34.x86_64
  • Guest kernel: 5.14.0-9parrot1-amd64
  • Virt-Manager: 3.2.0
Edited Dec 19, 2021 by Alex Caston
Assignee
Assign to
Time tracking