Keyboard layouts: WHERE are they!?
Keyboard layouts: WHERE are they!?
hi
dose anyone know where i could get information on and/or keyboard layout scan codes.
dose anyone know where i could get information on and/or keyboard layout scan codes.
.................................. um what should i put here .............................?..........................................
..... ................
..... ................
I used Bran's, but I think it has a couple errors in it. At least, I know I had to fix and reprogram a couple things.
Here is my map from scanset 1 keyboard scancodes into lowercase ascii.
Here is my map from scanset 1 keyboard scancodes into lowercase ascii.
Code: Select all
kbd_table:
db 255, 27, '1234567890-=', 8, 9 ; bad, esc, backspace & tab
db 'qwertyuiop[]', 13, 2 ; Enter & left ctl
db 'asdfghjkl;', 39, '`', 0 ; Left shift
db '\zxcvbnm,./', 1 ; Right shift
db 150, 4, ' ', 12 ; Kp*, Left Alt, sp, NumLock
db 128, 129, 130, 131, 132, 133, 134, 135, 136, 137 ; F1 - F10
db 11, 10, 147, 148, 149, 153 ; CapsLock, ScrlLck, Kp7-9, Kp-
db 144, 145, 146, 151 ; Kp4-6, Kp+
db 141, 142, 143, 140, 154, 14 ; Kp1-3, Kp0, Kp., Alt-PrtSc
db 255, 255, 138, 139, 255 ; 2 bad, F11, F12, 1 bad
db 255, 255, 255, 255, 255, 255 ; 5a to 5f are bad
; and now for all the codes with an e0 in front
kbd_e0tbl:
db 255, 255, 255, 255, 255, 255, 255, 255 ; most e0 esc's are illegal
db 255, 255, 255, 255, 255, 255, 255, 255 ; 8 to 0f
db 255, 255, 255, 255, 255, 255, 255, 255 ; 10 to 17
db 255, 255, 255, 255, 152, 3, 255, 255 ; 18 to 1b, KpEnt, Rctl, 1e, 1f
db 255, 255, 255, 255, 255, 255, 255, 255 ; 20 to 27
db 255, 255, 6, 255, 255, 255, 255, 255 ; 28, 29, fake Lshft, 2b to 2f
db 255, 255, 255, 255, 255, 155, 7, 15 ; 30 to 34, Kp/, fake Rshft, ctlPrtScn
db 5, 255, 255, 255, 255, 255, 255, 255 ; Right Alt, 39 to 3f
db 255, 255, 255, 255, 255, 16, 17, 29 ; 40 to 44, Pause, ctlPause, Home
db 30, 31, 255, 26 ; arrUp, PgUp, bad, arrLeft
db 255, 28, 255, 23 ; bad, arrRight, bad, End
db 24, 25, 22, 0x7f ; arrDown, PgDn, Ins, Del
db 255, 255, 255, 255 ; 54 to 57
db 255, 255, 255, 20 ; 58 to 5a bad, LWindow
db 21, 18, 255, 255 ; RWindow, Menu, 5e, 5f
as far as i can tell those all those the us-international keyboard scan code.
dose anyone know of info about other keyboard layouts such as the uk keyboard layout.
but thanks for your help anyway
dose anyone know of info about other keyboard layouts such as the uk keyboard layout.
but thanks for your help anyway
.................................. um what should i put here .............................?..........................................
..... ................
..... ................
just change the table so that when a key is pressed it provides the right letter like so
Code: Select all
unsigned char kbdus[128] =
{
0, 27, '1', '2', '3', '4', '5', '6', '7', '8', /* 9 */
'9', '0', '-', '=', '\b', /* Backspace */
'\t', /* Tab */
'q', 'w', 'e', 'r', /* 19 */
't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', /* Enter key */
KEY_CTRL, /* 29 - Control */
'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', /* 39 */
'\'', '`', KEY_LSHIFT, /* Left shift */
'\\', 'z', 'x', 'c', 'v', 'b', 'n', /* 49 */
'm', ',', '.', '/', KEY_RSHIFT, /* Right shift */
'*',
KEY_ALT, /* Alt */
' ', /* Space bar */
KEY_CAPS, /* Caps lock */
KEY_F1, /* 59 - F1 key ... > */
KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9,
KEY_F10, /* < ... F10 */
0, /* 69 - Num lock*/
0, /* Scroll Lock */
KEY_HOME, /* Home key */
KEY_UP, /* Up Arrow */
KEY_PGUP, /* Page Up */
'-',
KEY_LEFT, /* Left Arrow */
0,
KEY_RIGHT, /* Right Arrow */
'+',
KEY_END, /* 79 - End key*/
KEY_DOWN, /* Down Arrow */
KEY_PGDOWN, /* Page Down */
KEY_INSERT, /* Insert Key */
KEY_DEL, /* Delete Key */
0, 0, 0,
KEY_F11, /* F11 Key */
KEY_F12, /* F12 Key */
0, /* All other keys are undefined */
};
unsigned char kbdvorak[128] =
{
0, 27, '1', '2', '3', '4', '5', '6', '7', '8', /* 9 */
'9', '0', '[', ']', '\b', /* Backspace */
'\t', /* Tab */
'\'', ',', '.', 'p', /* 19 */
'y', 'f', 'g', 'c', 'r', 'l', '/', '=', '\n', /* Enter key */
KEY_CTRL, /* 29 - Control */
'a', 'o', 'e', 'u', 'i', 'd', 'h', 't', 'n', 's', /* 39 */
'-', '`', KEY_LSHIFT, /* Left shift */
'\\', ';', 'q', 'j', 'k', 'x', 'b', /* 49 */
'm', 'w', 'v', 'z', KEY_RSHIFT, /* Right shift */
'*',
KEY_ALT, /* Alt */
' ', /* Space bar */
KEY_CAPS, /* Caps lock */
KEY_F1, /* 59 - F1 key ... > */
KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9,
KEY_F10, /* < ... F10 */
0, /* 69 - Num lock*/
0, /* Scroll Lock */
KEY_HOME, /* Home key */
KEY_UP, /* Up Arrow */
KEY_PGUP, /* Page Up */
'-',
KEY_LEFT, /* Left Arrow */
0,
KEY_RIGHT, /* Right Arrow */
'+',
KEY_END, /* 79 - End key*/
KEY_DOWN, /* Down Arrow */
KEY_PGDOWN, /* Page Down */
KEY_INSERT, /* Insert Key */
KEY_DEL, /* Delete Key */
0, 0, 0,
KEY_F11, /* F11 Key */
KEY_F12, /* F12 Key */
0, /* All other keys are undefined */
};
-
- Member
- Posts: 368
- Joined: Sun Sep 23, 2007 4:52 am
For every keyboard layout? There's over 90 of them. His house will be filled with keyboards by the time he's done.JamesM wrote:Why don't you just do it yourself, like I did?
I took the US keyboard layout, then, when some keys didn't work I got my OS to print out their scancodes, then edited them. Simple as!
- JackScott
- Member
- Posts: 1036
- Joined: Thu Dec 21, 2006 3:03 am
- Location: Hobart, Australia
- Mastodon: https://aus.social/@jackscottau
- Matrix: @JackScottAU:matrix.org
- GitHub: https://github.com/JackScottAU
- Contact:
There is no other way IMHO. Can't trust on work of others, only hope that its right and hope to check it some day. Otherwise mistakes will be copied from one program to another.Craze Frog wrote:For every keyboard layout? There's over 90 of them. His house will be filled with keyboards by the time he's done.
I disagree. There are 5 million distinct pieces of hardware out there. It is quite impossible for each of us to independently build fully tested drivers for all of them. We do not have the time, or finances, to accomplish any such thing. Therefore, we *must* make it possible for other people's after-the-fact contributions to be added to our OSes -- if we have to label them "untrusted", then so be it. And that is precisely the situation here, with keyboard layouts. We need each non-US layout submitted to be as fully tested as possible, but we will all certainly reach the point where we simply have to accept what is provided by others.exkor wrote:There is no other way IMHO. Can't trust on work of others, only hope that its right and hope to check it some day. Otherwise mistakes will be copied from one program to another.