Member-only story

A Beginner’s Guide to Using xbindkeys for Custom Key Bindings in Linux

Siva
3 min readMar 28, 2023

Introduction

xbindkeys is a program that allows you to bind keys or mouse buttons to commands in Linux. It is a simple and efficient tool that can be used to automate repetitive tasks, improve workflow, and increase productivity. In this article, we will learn about xbindkeys, And It’s installation, and how to use it.

Installation

Before we dive into the usage of xbindkeys, we need to install it. xbindkeys is available in most Linux distributions, and you can install it using your system’s package manager. For example, on Ubuntu, you can install it using the following command:

sudo apt-get install xbindkeys

Usage

Once you have installed xbindkeys, you can start using it to bind keys or mouse buttons to commands. To do this, you need to create a configuration file called .xbindkeysrc in your home directory. This file contains the bindings between keys and commands.

Syntax

The syntax for the .xbindkeysrc file is straightforward. Each binding consists of three parts:

"<command>"
<key>

The <key> represents the key or mouse button that you want to bind, and the <command> represents the command that you want to execute when the key or mouse button is pressed.

Example

--

--

No responses yet