Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] QEMU/KVM send F10

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
k829king
Posts: 133
Joined: 2018-08-26 09:47

[SOLVED] QEMU/KVM send F10

#1 Post by k829king »

If I start up a virtual machine and then "open" from Virtual Machine manager how can I send F10 to it? When I press F10 the File menu option is selected on the VM Viewer.
The "Send Key" appears to be a hardcoded list of key combinations and the Print key, doesn't appear to be an option to tailor or provide an alternative?
Last edited by k829king on 2021-05-31 10:02, edited 1 time in total.

CwF
Global Moderator
Global Moderator
Posts: 2709
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: QEMU/KVM send F10

#2 Post by CwF »

The GUI can't, use 'virsh send-key'

on second thought, you must be hitting F10 while the vm is not in focus, but the host viewer is. You don't need to 'send key'. F10 works fine in VM's

k829king
Posts: 133
Joined: 2018-08-26 09:47

Re: QEMU/KVM send F10

#3 Post by k829king »

The GUI can't, use 'virsh send-key'
so can I use that command if the VM has been started via Virtual Machine Manager?
the help says the syntax is

Code: Select all

send-key domain [--codeset codeset] [--holdtime holdtime] keycode...
How do I determine the domain?
on second thought, you must be hitting F10 while the vm is not in focus, but the host viewer is. You don't need to 'send key'. F10 works fine in VM's
erm... it does have focus .. but I do get different behaviour depending on which VM I start.
If I start a terminal, then start mc
on a VM running LMDE2 the F10 launches the terminal file menu aok.
But on a VM running Debian 9 the F10 results in the VM File menu being selected?

CwF
Global Moderator
Global Moderator
Posts: 2709
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: QEMU/KVM send F10

#4 Post by CwF »

k829king wrote: But on a VM running Debian 9 the F10 results in the VM File menu being selected?
Focus is confused - pay close attention to mouse location -
The only variation to focus is locking the kbm in the vm. Without this then a tablet like trigger will follow the host cursor - all context hints from this location - for the F10 to work, mouse needs to be within the window.

The VM has a Tablet device or not. Of course you need a viewer window!

If you are sending the keystroke to a running domain without a viewer...?
The domain is the name of the vm.

k829king
Posts: 133
Joined: 2018-08-26 09:47

[SOLVED-ISH] Re: QEMU/KVM send F10

#5 Post by k829king »

Focus is confused - pay close attention to mouse location -
The only variation to focus is locking the kbm in the vm. Without this then a tablet like trigger will follow the host cursor - all context hints from this location - for the F10 to work, mouse needs to be within the window.
The mouse is within the boundaries of the terminal running mc, and besides other Function keys work on mc as expected, it is only the F10 that is not.
The VM has a Tablet device or not. Of course you need a viewer window!

If you are sending the keystroke to a running domain without a viewer...?
I don't understand this... there is no Tablet involved ... and I am viewing it via whatever "Open" on the Virtual Machine Manager provides.
The domain is the name of the vm.
I tried

Code: Select all

$ virsh send-key deb9-vm KEY_F10
but get

Code: Select all

error: failed to get domain 'deb9-vm'
deb9-vm is the name of the vm ?

So I have found a solution, though I don't know why it should affect it? The F10 key is passed correctly when the VM Details Display setting is set to SPICE. When it is on VNC the issue with F10 occurs.

CwF
Global Moderator
Global Moderator
Posts: 2709
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: QEMU/KVM send F10

#6 Post by CwF »

k829king wrote:. there is no Tablet involved
The VM's have devices, 'Tablet' 'Mouse' 'Keyboard'. Tablet (optional) changes the behavior. How VNC differs I don't know, that's a win-centric and maybe wayland thing, I don't use it, the spice must flow.

I thought only <CTRL><ALT> was trapped for the host. I've never seen this issue. There are changes recently for 'extra' keys and mouse wheels.
k829king wrote: deb9-vm is the name of the vm ?
For VM's on the local machines as user add "-c qemu:///system"
Test as user;

Code: Select all

$ virsh list
$ virsh -c qemu:///system list

k829king
Posts: 133
Joined: 2018-08-26 09:47

Re: [SOLVED] QEMU/KVM send F10

#7 Post by k829king »

Thankyou
$virsh list
So that returned an empty list, doh... but in my case

Code: Select all

$sudo virsh list
Does return expected deb9-vm
so

Code: Select all

$sudo virsh send-key deb9-vm KEY_F10
does what I need. this seems to work whether using VNC or Spice
and as found with Spice the F10 is honoured anyway.

Post Reply