The officially official Devuan Forum!

You are not logged in.

#1 2026-02-01 06:12:58

zapper
Member
Registered: 2017-05-29
Posts: 1,226  

Qemu help

How do I switch to control alt f1-f12 in a vm on qemu?

I keep searching online but the search results are pretty damn useless.

One thing that popups a lot is sendkey, but what is the linux sendkey?

What key on the keyboard is that?

I don't understand


Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term  If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD Gnuinos
Peace Be With us All!

Offline

#2 2026-02-01 08:33:13

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,585  

Re: Qemu help

you need to add a parameter to qemu so that it attaches its "monitor" to either a socket that you can connect to, OR as multiplexed with the serial console.

For the first option, you add the qemu command line arguments -monitor unix:QEMU,server,nowait, and thereby get its monitor serving the socket QEMU in the working directory. You then connect to that via socat with a command like the following

socat -,escape=0x1c,rawer unix:QEMU

which sets up a raw termnal connection to that monitor; you break the connection with key ctrl-\ (control-backslash).

For the second option you instead modify (or add) serial line arguments to be -serial mon:stdio, and thereby get multiplexed monitor and serial console on the run terminal. In that case it starts in serial mode so you need to press ctrl-a c to switch to the qemu monitor.

Then, once you have the monitor, you will issue the commands like sendkey ctrl-alt-f2 etc so as to make the monitor send that key.

hth

Offline

#3 2026-02-02 05:33:45

zapper
Member
Registered: 2017-05-29
Posts: 1,226  

Re: Qemu help

@ralph

It seems I found a way, I misunderstood what I was seeing on the search engine.

I tried typing in sendkey ctrl alt f1 or something like that in qemu part and it worked.

That was a result I saw, but I misunderstood the sendkey part. where that was.


Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term  If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD Gnuinos
Peace Be With us All!

Offline

Board footer