#
# /etc/matchbox/kbdconfig - Default key bindings for Slint
# Default upstream key bindings are in /usr/share/matchbox/kbdconfig
#
# Matchbox window manager keyboard configuration. Documentation:
# man matchbox-window-manager
# /usr/doc/matchbox-window-manager-1.2.2/README.Slint
# /usr/doc/matchbox/matchbox-manual.html
#
# You can override this file per user in ~/.matchbox/kbdconfig then
# customize these key bindings, but avoid conflicts with system or
# accessibility shortcuts.
#
# Notes:
# - Use <Ctrl>, <Alt>, <Shift>, <Super> modifiers.
#   <Super>is also named the Windows key
# - Commands prefixed with '!' are executed in a shell.

### ----------------------------------------------------------
###  Window operations
### ----------------------------------------------------------

# Cycle through windows
<Alt>Tab=next
<Alt><Shift>Tab=prev

# Close focused window
<Alt>F4=close

# Toggle fullscreen
F11=fullscreen

### ----------------------------------------------------------
###  Application launchers
### ----------------------------------------------------------

# Open the desktop
<Ctrl><Super>d=!matchbox-desktop -m WINDOW

# Command launcher
<Alt>F2=!bashrun

# Open a terminal
<Ctrl><Alt>t=!lxterminal

# Launch a file manager
<Ctrl><Alt>p=!pcmanfm

### ----------------------------------------------------------
###  Accessibility and utilities
### ----------------------------------------------------------

# Restart Orca screen reader
<Ctrl><Alt>o=!orca -r &

# Force kill (click on a frozen window)
<Ctrl><Alt>k=!xkill

### ----------------------------------------------------------
###  Session and power control
### ----------------------------------------------------------

# Logout (end X session safely)
<Ctrl><Super>l=!kill "$(cat /tmp/.X"${DISPLAY#:}"-lock)"

# Reboot the system
<Ctrl><Super>r=!matchbox-terminal -e "bash -c 'sudo -p \"Type the root password to reboot, or press Ctrl+C to cancel: \" /sbin/reboot'"

# Shutdown the system
<Ctrl><Super>s=!matchbox-terminal -e "bash -c 'sudo -p \"Type the root password to power off, or press Ctrl+C to cancel: \" /sbin/shutdown -h now'"

### ----------------------------------------------------------
###  End of file
### ----------------------------------------------------------

