Sponsored Content
Top Forums UNIX for Advanced & Expert Users Questions about the Linux console keyboard driver / translation tables Post 302606324 by Bill Cosby on Saturday 10th of March 2012 04:50:17 PM
Old 03-10-2012
Questions about the Linux console keyboard driver / translation tables

Hi there,

I am trying to understand the logic of the Linux keyboard driver, I am not sure if this is the right place to ask, but I don't know where else I could.

Btw. I am talking about an unicode console here.

1.) The Linux kernel (currently) can take 256 translation tables (keymaps), I figured that if I have 8 Mod-Keys and I can press two at the same time, then this makes 256 possible modifications.
E.g. the value of my keycode of the button 'a' is 0x0b61 (small letter a) in table 0 and 0x0b41 (capital letter A) in table 1, so is it true that table 1 is for shift pressed keycodes?
If so, then why is shift (KG_SHIFT in linux/keyboard.h) set to 0, and how do I compute the modifications, meaning how do I know what e.g. index 231 represents?

2.) As seen above, the value for 'a' is actually 0x0b61 instead of 0x0061, if b indicates a type (here KT_LOCK) why isn't it 0xfb61, because I thought that only values above 0xf000 represent typed values, and the values below are simply unicode values.
The values above are read via the KDGKBENT ioctl, are these values read differently then written?
E.g. would I only type 0xfb61 when using the KDSKBENT ioctl?

I hope anyone can help me out a little,
thank you very much in advance,
regards,
Bill
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux 7.2, Keyboard Problem!

I recently tried to install Linux 7.2 on my home PC (Compaq), and it did not recognise my keyboard. I could not proceed with the installation as I could not type anything. I installed 6.2 and it worked fine???????????. I was wondering if anybody has encountered this problem (very frustrating). ... (4 Replies)
Discussion started by: camerja1
4 Replies

2. UNIX for Dummies Questions & Answers

need help getting console driver number(index)

Well, i have a little problem here. I am given device "console" of symbolical type. I do need to get its driver's number (index ?) Your help would be greatly appreciated thx, axujet (1 Reply)
Discussion started by: axujet
1 Replies

3. UNIX for Dummies Questions & Answers

Need Book for Linux Basics and Linux device driver.

hai friend, I am new to Linux, i need a book for Linux basic and Linux device driver .. plz send the book name and author(Easy to learn and mostly used by programmers) and also send the link if it is available in Net... Thank you. ... (0 Replies)
Discussion started by: sundar.lsr
0 Replies

4. UNIX for Advanced & Expert Users

How to write a keyboard driver?

How to write a keyboard driver with interrupt driven? the platform is ARM and the interface is SRAMC with I/O mapped. What should my handler and read fucntions contains? and I want to know how to map the memory by using the ioremap() function? when exactly we have to use mmap()can you please help... (0 Replies)
Discussion started by: rkkcorleone
0 Replies

5. UNIX for Dummies Questions & Answers

Windows to Linux remote console using VNC brings up blank console screen with only mouse pointer

:confused:Hi This was installed on the Linux box a few weeks back by a guy that no longer works for us. All worked fine until last week. Now when we connect its just a blank screen with no icons. I get a whole bunch of errors when starting the service too: Tue Feb 23 14:29:45 2010 ... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

6. Programming

Access keyboard driver

(USING FEDORA 16) I am using following command: cat `pwd`/pci-0000:00:1d.0-usb-0:1.3:1.0-event-kbd to access the keyboard driver to make a key logger ,but what i am getting is just some hash code ,please help me decrypt it. Thanks. (1 Reply)
Discussion started by: jayeshsharma52
1 Replies

7. Hardware

Difference between platform driver,codec driver and Machine driver

In general terms what are the differences platform driver,codec driver and Machine driver? (1 Reply)
Discussion started by: rupeshkp728
1 Replies

8. HP-UX

CDE Login on console won't use keyboard

Hi all, I'm installing a HP r2660 machine with HP-UX 11.23 (this version fixed by customer's product) and I've troubles using the VGA console as workstation display. At first it worked just as TEXT console, then I fixed /etc/dt/config/Xservers and now I've the CDE prompt for login. ... (5 Replies)
Discussion started by: larry100
5 Replies

9. Solaris

Solaris LDOM not accepting keyboard input at console

Ran into this issue today and wanted to share how I fixed it as there is not a lot a lot of info online on this issue. We upgraded our NetApp controllers to Ontap 9 and reboot all our iSCSI attached LDOMs after. One of the LDOM did not come up cleanly and it would not accept any keyboard inputs... (0 Replies)
Discussion started by: ncherukuri
0 Replies

10. Debian

Debian Etch - install us-keyboard driver

Hi, i'm using a debian-4.0r1 on an old subnet machine. I have to extend it with an other keyboard . What i have is a DVD of etch 4.0r7. How can i install and load the keyboard-driver for the us-keyboard? Can anybody please give me a hint how to do that? Thanks in advance (0 Replies)
Discussion started by: IMPe
0 Replies
MAPSCRN(8)						       International Support							MAPSCRN(8)

NAME
mapscrn - load screen output mapping table SYNOPSIS
mapscrn [-V] [-v] [-o map.orig] mapfile DESCRIPTION
The mapscrn command is obsolete - its function is now built-in into setfont. However, for backwards compatibility it is still available as a separate command. The mapscrn command loads a user defined output character mapping table into the console driver. The console driver may be later put into use user-defined mapping table mode by outputting a special escape sequence to the console device. This sequence is <esc>(K for the G0 character set and <esc>)K for the G1 character set. When the -o option is given, the old map is saved in map.orig. USE
There are two kinds of mapping tables: direct-to-font tables, that give a font position for each user byte value, and user-to-unicode tables that give a unicode value for each user byte. The corresponding glyph is now found using the unicode index of the font. The command mapscrn trivial sets up a one-to-one direct-to-font table where user bytes directly address the font. This is useful for fonts that are in the same order as the character set one uses. A command like mapscrn 8859-2 sets up a user-to-unicode table that assumes that the user uses ISO 8859-2. INPUT FORMAT
The mapscrn command can read the map in either of two formats: 1. 256 or 512 bytes binary data 2. two-column text file Format (1) is a direct image of the translation table. The 256-bytes tables are direct-to-font, the 512-bytes tables are user-to-unicode tables. Format (2) is used to fill the table as follows: cell with offset mentioned in the first column is filled with the value mentioned in the second column. When values larger than 255 occur, or values are written using the U+xxxx notation, the table is assumed to be a user-to-unicode table, otherwise it is a direct-to-font table. Values in the file may be specified in one of several formats: 1. Decimal: String of decimal digits not starting with '0' 2. Octal: String of octal digits beginning with '0'. 3. Hexadecimal: String of hexadecimal digits preceded by "0x". 4. Unicode: String of four hexadecimal digits preceded by "U+". 5. Character: Single character enclosed in single quotes. (And the binary value is used.) Note that blank, comma, tab character and '#' cannot be specified with this format. 6. UTF-8 Character: Single (possibly multi-byte) UTF-8 character, enclosed in single quotes. Note that control characters (with codes < 32) cannot be re-mapped with mapscrn because they have special meaning for the driver. OTHER OPTIONS
-V Prints version number and exits. -v Be verbose. FILES
/usr/share/consoletrans is the default directory for screen mappings. SEE ALSO
setfont(8) AUTHOR
Copyright (C) 1993 Eugene G. Crosser <crosser@pccross.msk.su> This software and documentation may be distributed freely. Local 20 March 1993 MAPSCRN(8)
All times are GMT -4. The time now is 04:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy