To type an exclamation mark (!) using virsh send-key, you need to pass the keycode sequence for the Shift and 1 keys, as ! is typically produced by pressing Shift+1 on a standard keyboard.
bashvirsh send-key <domain> KEY_LEFT_SHIFT KEY_1
Replace <domain> with the name or ID of your virtual machine.
KEY_LEFT_SHIFT presses the left Shift key.KEY_1 presses the 1 key.!.If you need to release the keys afterward, you can use:
bashvirsh send-key <domain> KEY_LEFT_SHIFT KEY_1 --release
virsh version or keyboard layout. If KEY_LEFT_SHIFT doesn't work, try KEY_SHIFT or KEY_SHIFT_L.Shift, Alt, Ctrl) with the base key.Vibe can make mistakes. Check answers. Learn more