Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure the device module of keyboard in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to configure the keyboard equipment module in Linux, the article is very detailed, has a certain reference value, interested friends must read it!

Configure the keyboard

1. Configure the device module of the keyboard

For our common keyboard, there are generally three types, one is the old-fashioned five-pin keyboard, the second is the ps/2 keyboard, the third is the usb mouse. For the first two keyboards, current linux distributions generally package the device modules they need into the kernel, so the keyboard can work properly without additional module insertion. As for the usb type keyboard, generally speaking, the corresponding device module must be inserted in order for it to work properly.

For a usb type keyboard, if you want to make it work by manually loading the module, you must first insert the usb bridge module, and then you must insert the keyboard module usbkbd.o, as well as keybdev.o, for the usb keyboard to work properly. At this point, the system command that is running:

/ sbin/modprobe usbkbd

/ sbin/modprobe keybdev

For the 2.2.x kernel to automatically load the kernel's kmod when needed, you must set the alias usb-interface in the / etc/modules.conf file, which corresponds to the bridge module you are using. For example, when the bridge type is UHCI, add the device alias to / etc/modules.conf:

Alias usb-interface usb-uhci

For 2.4.x series kernels, this device alias becomes:

Alias usb-controller usb-uhci

After this alias is set, usb device detection is automatically performed when the system boots. When the detection process finds that the connected device is supported by the system, the system will automatically insert the required module.

two。 Keyboard profile

Keyboard configuration file / etc/sysconfig/keyboard, its content is very simple, and the optional option is KEYTABLE (the contents of this file will vary depending on the distribution, but this field is the most important). For example, when KEYTABLE = "us" is set, the system uses an American keyboard.

Then, in order to use the function keys on the keyboard correctly, you also need to call the command dumpkeys to generate the file / etc/sysconfig/console/default.kmap.

/ usr/bin/dumpkeys > / etc/sysconfig/console/default.kmap

This file describes the keyboard scan code of the keyboard and the corresponding keyboard scan code of the keyboard modified by the keyboard.

Similarly, in order for the keyboard to work in the X system environment, you may also need to set the keyboard in the X system, and you must use xmodmap to set the correct keyboard mapping. For example,

/ usr/X11R6/bin/xmodmap / usr/share/xmodmap/xmodmap.fr

Set the keyboard under your X system to French keyboard.

After the / etc/sysconfig/keyboard file is configured correctly, the X system's configuration program will configure the section on keyboard configuration in X based on the information in this file. The X system cannot be started and configured when the contents of this file are incorrect or the file does not exist.

The above is all the contents of the article "how to configure the device module of keyboard in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report