Joined: 05 Sep 2012
|Posted: Wed Sep 05, 2012 1:34 am Post subject: control keys + kvm guests in xmonad
I am having a problem and I am not quite sure where to direct it. I am using a tiling window manager called xmonad. With this window manager, you use keyboard shortcuts to move between workspaces, a mouse is never needed. I use mod4(windows key) + 1-9 to move between workspaces. The issue comes about when trying to use KVM and specifically, virt-manager to use VMs inside of my main OS. When using virt-manager, the guest OS grabs my keyboard, and as such, mod4 + num keys are directed into the guest VM and not at the host OS. This causes the functionality of the tiling window manager to deteriorate to the point of unusability. I need the mod4 + num control sequence to always be sent to xmonad, and not be trapped by the guest OS.
To solve this issue, I see possible solutions. 1, added functionality in virt-manager. 2, functionality in xmonad itself. 3, using the x-server to somehow remap the keystroke to a control key.
I know very little about all of these solutions. I am posting this in a few places in hopes that someone might come up with an elegant solution.
the path that I am currently researching is using xmodmap to remap mod4 into cnrtl + alt + f12 and remapping the xmonad hotkey to the same control sequence. I don't know wether xmonad can use a 4 key combination to control windows or if xmodmap can remap keys in this manner in the first place.
Another solution - that I am really hoping exists, would be to use xmonad to restrict the mod key from being sent to any applications other than xmonad itself.
Any insight that you guys might have into this would be greatly appreciated!
PS. Moderator: I was unable to post this in Desktop Environments - where I think this topic belongs, if someone wouldn't mind moving this topic there, that would be great!