Open In App

dumpkeys command in Linux with examples

Last Updated : 23 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

‘dumpkeys’ command in Linux is used for the dump keyboard translation tables. It writes to the standard output and the current contents of the keyboard driver’s translation tables in the format specified by Keymaps.

Here, we’ll break down the syntax, options, and practical examples of using the dumpkeys command to make the most of this utility.

Syntax

dumpkeys [Options]

Basic ‘dumpkeys’ Command Example

https://write.geeksforgeeks.org/improve-post/5965564

Common Options for ‘dumpkeys’

Here’s a breakdown of the most common options you can use with ‘dumpkeys’ to retrieve specific information:

1. -h(- -help):

Displays the list of available options for the dumpkeys command and exits.

2. -i(- -short-info):

Prints out the characteristics of the kernel keyboard driver. Information shown are:

  • Keycode Range supported by the kernel: Tells the values that can be used after keycode -keyword in keytable files.
  • Number of actions bindable to a key: It tells about how many output a single key can output using different modifier keys.
  • Ranges of action codes supported by the kernel: It lists the action values ranging hexadecimal notation, which can be used in the right-hand side of a key definition.
  • Number of function keys supported by kernel: It shows the number of action codes that can be used in output strings of characters.

-i option

3. -l(- -long-info):

Instructs dumpkeys to print out long information with the list of all action symbols supported by dumpkeys along with symbol’s numeric values. -l option-l option

3. -n(- -numeric):

By-pass the conversion of action code values to symbolic notation and to print the in hexadecimal format instead. -n option

4. -f(- -full-table):

Skips all short-hand doubtful output and binds the output in canonical form. -f option

5. -t(–funcs-only):

Usually dumpkeys prints both the key bindings and the string definitions however, if you specify this option it will print only the function key string definitions.

6. -k(–keys-only):

Usually dumpkeys prints both the key bindings and the string definitions however, if you specify this option then it will print out keys bindings only. -k option

7. -d(–compose-only):

It prints out only compose key combinations, only if your kernel supports compose key support. -d option

8. -c(–charset):

It Interprets character action codes to be from the specified character set.

Conclusion

The dumpkeys command is a highly versatile utility for Linux users who need to manage and troubleshoot keyboard layouts. By understanding its options and how to use them effectively, you can take full control over your Linux system’s keyboard configuration.


Next Article

Similar Reads