On Ubuntu Linux, set Tab to q

TL;DR

environment

$ uname -srvmpio
Linux 4.18.0-25-generic #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic

xmodmap and xev

You can change the key assignments with the command xmodmap.

$ xmodmap -e "keycode [keycode] = [keysym]"

You can assign the physical key pointed to by [keycode] to the content pointed to by [keysym].

To find out these, use the xev command.

$ xev

You can check the key code and keysym by pressing the key after starting the command.

If you press "q", the keycode is 24 and the keysym is q.

KeyPress event, serial 37, synthetic NO, window 0x5e00001,
    root 0x17e, subw 0x0, time 5825075, (42,674), root:(197,823),
    state 0x0, keycode 24 (keysym 0x71, q), same_screen YES,
    XLookupString gives 1 bytes: (71) "q"
    XmbLookupString gives 1 bytes: (71) "q"
    XFilterEvent returns: False

If you press "Tab", the keycode is 23 and the keysym is Tab.

KeyPress event, serial 37, synthetic NO, window 0x5e00001,
    root 0x17e, subw 0x0, time 5804891, (141,203), root:(296,352),
    state 0x0, keycode 23 (keysym 0xff09, Tab), same_screen YES,
    XLookupString gives 1 bytes: (09) "	"
    XmbLookupString gives 1 bytes: (09) "	"
    XFilterEvent returns: False

Set Tab to q

Now that we have the information so far, to set Tab to q, do the following:

$ xmodmap -e "keycode 23 = q"

To undo it, do the following:

$ xmodmap -e "keycode 23 = Tab"

Please note that this change is for the current X Window session only and has no permanent application.

Personally, that's fine ...

Recommended Posts

On Ubuntu Linux, set Tab to q
How to install php7.4 on Linux (Ubuntu)
Install debian on linux on Arrows tab Q584 / H
How to build Java environment on Ubuntu (Linux)
Set up Python 3.4 on Ubuntu
Set matplotlib font on ubuntu
I want to use OpenJDK 11 on Ubuntu Linux 18.04 LTS / 18.10
On Linux (Ubuntu), tune the Trackpad and set the function to a three-finger swipe
How to set up Ubuntu for Windows Subsystem for Linux 2 (WSL2)
Easy copy to clipboard on Linux
How to install VMware-Tools on Linux
How to install MBDyn (Linux Ubuntu)
How to install Go on Ubuntu
Run cron on Amazon Linux (set on Linux)
[sed] Use sed to replace tab characters on both macOS and Linux
How to install aws-session-manager-plugin on Manajro Linux
How to update php on Amazon linux 2
How to display emoji on Manjaro Linux
Upgraded mysql on Cloud9 (Amazon Linux) (5.5 to 5,7)
How to install packages on Alpine Linux
5 reasons to install Linux on your laptop.
How to install Anisble on Amazon Linux 2
Run bootgen on Debian GNU / Linux, Ubuntu
How to update security on CentOS Linux 8
How to find large files on Linux
What to do after installing Linux (Ubuntu)
Gusto cannot connect to Wifi on Linux
Compiling the Linux kernel (Linux 5.x on Ubuntu 20.04)
Linux screen distribution on Ubuntu Memo that wants to be a Linux screen distribution YouTuber
Set up golang with goenv on GNU / Linux
[Latest] How to build Java environment on Ubuntu
Shebang on Ubuntu 20.04
linux (ubuntu) memo
How to run MeCab on Ubuntu 18.04 LTS Python
[Linux] How to read .bashrc of general user as root user on WSL2 Ubuntu20.04
[Linux] Introduction to Linux
Easy way to load CPU / memory on Linux
Deliver OBS footage to Zoom on Arch Linux
Try to create a new command on linux
Set up an Objective-C 2.0 development environment on Linux
How to install Camunda Modeler on Manjaro Linux
I want to log file I / O on Linux
I want to realize something like AutoHotkey with AutoKey on Ubuntu (Kali Linux)
Set the startup script on Linux (RasPi, Edison)
How to create a Python 3.6.0 environment by putting pyenv on Amazon Linux and Ubuntu
How to use C216 Audio Controller on Arch Linux
Set up a file server on Ubuntu 20.04 using Samba
Yum command to access MySQL with Python 3 on Linux
Set up Docker on Oracle Linux (7.x) with Vagrant
How to set layer on Lambda using AWS SAM
[Part 1] Let's set up a Minecraft server on Linux
Preparing to use Ansible on an existing Linux server
How to install git on Linux such as EC2
Multiply PDF by OCR on command line on Linux (Ubuntu)
[Tips] How to use iPhone as webcam on Linux
How to build a Python environment on amazon linux 2
Set up python and machine learning libraries on Ubuntu
[AWS] How to expand disk space on Amazon linux
Daemonizing processes on Linux
Install TensorFlow on Ubuntu
jblas on Arch Linux