Linux: xvkbd tutorial

By Xah Lee. Date: .

xvkbd is command line tool that lets you send a keyboard key signal or mouse click.

linux x11 virtual keyboard xvkbd

Install xvkbd

# install xvkbd
sudo apt-get install xvkbd

xvkbd Command Example

# this command sends the key control+c
xvkbd -no-jump-pointer -xsendevent -text '\Cc'
# this command sends mouse left click
xvkbd -no-jump-pointer -xsendevent -text '\m1'

xvkbd key syntax

xvkbd key syntax
\[Print]PrtScn (Print Screen)
\[Scroll_Lock]Scroll Lock (Scroll Lock)
\[Pause/Break]Pause (Pause/Break)
\rReturn ↩
\eEsc (escape)
\b⌫ Backspace
\d⌦ Delete
\SShift (modify the next character)
\CCtrl (modify the next character)
\AAlt (modify the next character)
\M◆ Meta (modify the next character)
\[keysym]keysym is X11's key syntax. (For example, \[Left]) 〔►see Linux: X11 Keyboard Key Names
\m1mouse left click
\m2mouse middle click
\m3mouse right click
\mdigitmouse click of the specified mouse button. 〔►see Linux: X11 Mouse Button Numbering

〔►see Linux: X11 Keyboard Key Names

Bind Keys to Command

For xvkbd to be useful, you need to bind keys to command.

For example, make F2 do Ctrl+c.


Linux Keybinding Topic

  1. Linux: Keyboard Software Guide
  2. Linux: Swap Control Alt Keys, xmodmap
  3. Linux: Set F2 F3 F4 to Cut Copy Paste
  4. Linux: Swap CapsLock Escape Keys
  5. Linux: Make CapsLock Do Home Key
  6. Linux: Setup Shift Lock Key
  7. Linux: Add Keyboard Shortcut to Switch App
  8. Linux: Set Key Repeat Rate
  9. Linux: Set System Keyboard Layout
  10. Linux: How to Switch to Dvorak Keyboard Layout
  11. Linux: Change Volume by Command
  12. Linux: xmodmap Tutorial
  13. Linux: xbindkeys Tutorial
  14. Linux: xvkbd tutorial
  15. Linux: Find Keyboard Key Scancode
  16. Linux: X11 Keyboard Key Names