Index: usr.sbin/bhyve/Makefile =================================================================== --- usr.sbin/bhyve/Makefile +++ usr.sbin/bhyve/Makefile @@ -132,4 +132,6 @@ WARNS?= 2 +SUBDIR= kbdlayout + .include Index: usr.sbin/bhyve/bhyve.8 =================================================================== --- usr.sbin/bhyve/bhyve.8 +++ usr.sbin/bhyve/bhyve.8 @@ -47,6 +47,7 @@ .Sm on .Op Fl G Ar port .Op Fl k Ar file +.Op Fl K Ar layout .Oo Fl l .Sm off .Cm help | Ar lpcdev Op Cm \&, Ar conf @@ -155,6 +156,14 @@ Set configuration variables from a simple, key-value config file. Each line of the config file is expected to consist of a config variable name, an equals sign +.It Fl K Ar layout +Specify the keyboard layout. +The value that can be specified sets the file name in +.Ar /usr/share/bhyve/kbdlayout . +This specification only works when loaded with UEFI mode for VNC. +(Not working via serial console or SSH) +When using a VNC client that supports QEMU Extended Key Event Message (e.g. TigerVNC), this option isn't needed. +When using a VNC client that doesn't support QEMU Extended Key Event Message (e.g. tightVNC), the default layout defaults to the US keyboard unless specified otherwise. .Pq Sq = , and a value. No spaces are permitted between the variable name, equals sign, or Index: usr.sbin/bhyve/bhyverun.h =================================================================== --- usr.sbin/bhyve/bhyverun.h +++ usr.sbin/bhyve/bhyverun.h @@ -38,6 +38,8 @@ extern int guest_ncpus; extern uint16_t cores, sockets, threads; +extern char *kbdlayout_name; + void *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len); #ifdef BHYVE_SNAPSHOT uintptr_t paddr_host2guest(struct vmctx *ctx, void *addr); Index: usr.sbin/bhyve/bhyverun.c =================================================================== --- usr.sbin/bhyve/bhyverun.c +++ usr.sbin/bhyve/bhyverun.c @@ -187,6 +187,8 @@ int guest_ncpus; uint16_t cores, maxcpus, sockets, threads; +char *kbdlayout_name; + int raw_stdio = 0; static char *progname; @@ -224,7 +226,7 @@ fprintf(stderr, "Usage: %s [-aehuwxACDHPSWY]\n" " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n" - " %*s [-k ] [-l ] [-m mem] [-o =]\n" + " %*s [-k ] [-K layout] [-l ] [-m mem] [-o =]\n" " %*s [-p vcpu:hostcpu] [-s ] [-U uuid] []\n" " -a: local apic is in xAPIC mode (deprecated)\n" " -A: create ACPI tables\n" @@ -235,6 +237,7 @@ " -h: help\n" " -H: vmexit from the guest on hlt\n" " -k: key=value flat config file\n" + " -K: PS2 keyboard layout\n" " -l: LPC device configuration\n" " -m: memory size in MB\n" " -o: set config 'var' to 'value'\n" @@ -1211,6 +1214,7 @@ size_t memsize; const char *value, *vmname; char *optstr; + kbdlayout_name = NULL; #ifdef BHYVE_SNAPSHOT char *restore_file; struct restore_state rstate; @@ -1224,9 +1228,9 @@ progname = basename(argv[0]); #ifdef BHYVE_SNAPSHOT - optstr = "aehuwxACDHIPSWYk:o:p:G:c:s:m:l:U:r:"; + optstr = "aehuwxACDHIPSWYk:o:p:G:c:s:m:l:K:U:r:"; #else - optstr = "aehuwxACDHIPSWYk:o:p:G:c:s:m:l:U:"; + optstr = "aehuwxACDHIPSWYk:o:p:G:c:s:m:l:K:U:"; #endif while ((c = getopt(argc, argv, optstr)) != -1) { switch (c) { @@ -1264,6 +1268,9 @@ case 'k': parse_simple_config_file(optarg); break; + case 'K': + kbdlayout_name = optarg; + break; case 'l': if (strncmp(optarg, "help", strlen(optarg)) == 0) { lpc_print_supported_devices(); Index: usr.sbin/bhyve/console.h =================================================================== --- usr.sbin/bhyve/console.h +++ usr.sbin/bhyve/console.h @@ -34,7 +34,7 @@ struct bhyvegc; typedef void (*fb_render_func_t)(struct bhyvegc *gc, void *arg); -typedef void (*kbd_event_func_t)(int down, uint32_t keysym, void *arg); +typedef void (*kbd_event_func_t)(int down, uint32_t keysym, uint32_t keycode, void *arg); typedef void (*ptr_event_func_t)(uint8_t mask, int x, int y, void *arg); void console_init(int w, int h, void *fbaddr); @@ -47,7 +47,7 @@ void console_refresh(void); void console_kbd_register(kbd_event_func_t event_cb, void *arg, int pri); -void console_key_event(int down, uint32_t keysym); +void console_key_event(int down, uint32_t keysym, uint32_t keycode); void console_ptr_register(ptr_event_func_t event_cb, void *arg, int pri); void console_ptr_event(uint8_t button, int x, int y); Index: usr.sbin/bhyve/console.c =================================================================== --- usr.sbin/bhyve/console.c +++ usr.sbin/bhyve/console.c @@ -106,10 +106,10 @@ } void -console_key_event(int down, uint32_t keysym) +console_key_event(int down, uint32_t keysym, uint32_t keycode) { if (console.kbd_event_cb) - (*console.kbd_event_cb)(down, keysym, console.kbd_arg); + (*console.kbd_event_cb)(down, keysym, keycode, console.kbd_arg); } void Index: usr.sbin/bhyve/kbdlayout/Makefile =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/Makefile @@ -0,0 +1,46 @@ +# $FreeBSD$ + +FILESDIR= ${SHAREDIR}/bhyve/kbdlayout +FILES= default \ + am \ + be be_acc \ + bg_bds bg_phonetic \ + br br_noacc \ + by \ + ca ca-fr \ + centraleuropean centraleuropean_qwerty \ + ch ch_acc ch_macbook_acc ch-fr ch-fr_acc \ + colemak_acc \ + cz \ + de de_acc de_noacc \ + dk dk_acc dk_macbook \ + ee \ + es es_acc es_dvorak \ + fi \ + fr fr_acc fr_dvorak fr_dvorak_acc fr_macbook \ + gr gr_101_acc gr_elot_acc \ + hr \ + hu_101 hu_102 \ + il \ + is is_acc \ + it \ + jp jp_capsctrl \ + kz_io kz_kst \ + latinamerican latinamerican_acc \ + lt \ + nl \ + no no_dvorak nordic_asus-eee \ + pl pl_dvorak \ + pt pt_acc \ + ru ru_shift ru_win \ + se \ + si \ + sk \ + tr tr_f \ + ua ua_shift_alt \ + uk uk_capsctrl uk_dvorak uk_macbook \ + us us_acc us_ctrl \ + us_dvorak us_dvorakl us_dvorakp us_dvorakr us_dvorakx \ + us_emacs us_macbook us_unix + +.include Index: usr.sbin/bhyve/kbdlayout/Makefile.depend =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Index: usr.sbin/bhyve/kbdlayout/am =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/am @@ -0,0 +1,10 @@ +# bhyve ps2kbd keyboard layout file +# (am : Armenian phonetic layout) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +')',0x87; ) (0x29) +'+',0xce; + (0x2b) + Index: usr.sbin/bhyve/kbdlayout/be =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/be @@ -0,0 +1,45 @@ +# bhyve ps2kbd keyboard layout file +# (be : Belgian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x3e; ! (0x21) +'"',0x26; " (0x22) +'$',0x5b; $ (0x24) +'%',0x52; % (0x25) +'&',0x16; & (0x26) +''',0x25; ' (0x27) +'(',0x2e; ( (0x28) +')',0x4e; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x4a; + (0x2b) +',',0x3a; , (0x2c) +'-',0x55; - (0x2d) +'.',0x41; . (0x2e) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x4a; = (0x3d) +'>',0x61; > (0x3e) +'?',0x3a; ? (0x3f) +'A',0x15; A (0x41) +'M',0x4c; M (0x4d) +'Q',0x1c; Q (0x51) +'W',0x1a; W (0x57) +'Z',0x1d; Z (0x5a) +'\',0x61; \ (0x5c) +'^',0x54; ^ (0x5e) +'_',0x55; _ (0x5f) +'`',0x5d; ` (0x60) +'a',0x15; a (0x61) +'m',0x4c; m (0x6d) +'q',0x1c; q (0x71) +'w',0x1a; w (0x77) +'z',0x1d; z (0x7a) +'{',0x46; { (0x7b) +'|',0x16; | (0x7c) +'}',0x45; } (0x7d) +'~',0x4a; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/be_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/be_acc @@ -0,0 +1,42 @@ +# bhyve ps2kbd keyboard layout file +# (be_acc : Belgian (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x3e; ! (0x21) +'"',0x26; " (0x22) +'$',0x5b; $ (0x24) +'%',0x52; % (0x25) +'&',0x16; & (0x26) +''',0x25; ' (0x27) +'(',0x2e; ( (0x28) +')',0x4e; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x4a; + (0x2b) +',',0x3a; , (0x2c) +'-',0x55; - (0x2d) +'.',0x41; . (0x2e) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x4a; = (0x3d) +'>',0x61; > (0x3e) +'?',0x3a; ? (0x3f) +'A',0x15; A (0x41) +'M',0x4c; M (0x4d) +'Q',0x1c; Q (0x51) +'W',0x1a; W (0x57) +'Z',0x1d; Z (0x5a) +'\',0x61; \ (0x5c) +'_',0x55; _ (0x5f) +'a',0x15; a (0x61) +'m',0x4c; m (0x6d) +'q',0x1c; q (0x71) +'w',0x1a; w (0x77) +'z',0x1d; z (0x7a) +'{',0x46; { (0x7b) +'|',0x16; | (0x7c) +'}',0x45; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/bg_bds =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/bg_bds @@ -0,0 +1,10 @@ +# bhyve ps2kbd keyboard layout file +# (bg_bds : Bulgarian (BDS)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'(',0xa9; ( (0x28) +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/bg_phonetic =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/bg_phonetic @@ -0,0 +1,9 @@ +# bhyve ps2kbd keyboard layout file +# (bg_phonetic : Bulgarian (Phonetic)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/br =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/br @@ -0,0 +1,19 @@ +# bhyve ps2kbd keyboard layout file +# (br : Brazilian (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x0e; " (0x22) +''',0x0e; ' (0x27) +':',0x4a; : (0x3a) +';',0x4a; ; (0x3b) +'?',0x51; ? (0x3f) +'[',0x5b; [ (0x5b) +'\',0x61; \ (0x5c) +']',0x5d; ] (0x5d) +'{',0x5b; { (0x7b) +'|',0x61; | (0x7c) +'}',0x5d; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/br_noacc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/br_noacc @@ -0,0 +1,22 @@ +# bhyve ps2kbd keyboard layout file +# (br_noacc : Brazilian (without accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x0e; " (0x22) +''',0x0e; ' (0x27) +':',0x4a; : (0x3a) +';',0x4a; ; (0x3b) +'?',0x51; ? (0x3f) +'[',0x5b; [ (0x5b) +'\',0x61; \ (0x5c) +']',0x5d; ] (0x5d) +'^',0x52; ^ (0x5e) +'`',0x54; ` (0x60) +'{',0x5b; { (0x7b) +'|',0x61; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x52; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/by =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/by @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (by : Belarusian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/ca =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ca @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (ca : Canadian Bilingual) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/ca-fr =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ca-fr @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (ca-fr : French Canadian (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/centraleuropean =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/centraleuropean @@ -0,0 +1,12 @@ +# bhyve ps2kbd keyboard layout file +# (centraleuropean : Central European) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) + Index: usr.sbin/bhyve/kbdlayout/centraleuropean_qwerty =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/centraleuropean_qwerty @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (centraleuropean_qwerty : Central European (QWERTY)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/ch =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ch @@ -0,0 +1,36 @@ +# bhyve ps2kbd keyboard layout file +# (ch : Swiss-German) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x5b; ! (0x21) +'"',0x1e; " (0x22) +'$',0x5d; $ (0x24) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x26; * (0x2a) +'+',0x16; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'\',0x61; \ (0x5c) +'^',0x55; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x52; { (0x7b) +'|',0x16; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x55; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/ch-fr =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ch-fr @@ -0,0 +1,36 @@ +# bhyve ps2kbd keyboard layout file +# (ch-fr : Swiss-French) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x5b; ! (0x21) +'"',0x1e; " (0x22) +'$',0x5d; $ (0x24) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x26; * (0x2a) +'+',0x16; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'\',0x61; \ (0x5c) +'^',0x55; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x52; { (0x7b) +'|',0x16; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x55; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/ch-fr_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ch-fr_acc @@ -0,0 +1,33 @@ +# bhyve ps2kbd keyboard layout file +# (ch-fr_acc : Swiss-French (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x5b; ! (0x21) +'"',0x1e; " (0x22) +'$',0x5d; $ (0x24) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x26; * (0x2a) +'+',0x16; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'\',0x61; \ (0x5c) +'_',0x4a; _ (0x5f) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x52; { (0x7b) +'|',0x16; | (0x7c) +'}',0x5d; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/ch_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ch_acc @@ -0,0 +1,33 @@ +# bhyve ps2kbd keyboard layout file +# (ch_acc : Swiss-German (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x5b; ! (0x21) +'"',0x1e; " (0x22) +'$',0x5d; $ (0x24) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x26; * (0x2a) +'+',0x16; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'\',0x61; \ (0x5c) +'_',0x4a; _ (0x5f) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x52; { (0x7b) +'|',0x16; | (0x7c) +'}',0x5d; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/ch_macbook_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ch_macbook_acc @@ -0,0 +1,37 @@ +# bhyve ps2kbd keyboard layout file +# (ch_macbook_acc : Swiss-German Macbook/Macbook Pro (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x5b; ! (0x21) +'"',0x1e; " (0x22) +'$',0x5d; $ (0x24) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x26; * (0x2a) +'+',0x16; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x0e; < (0x3c) +'=',0x45; = (0x3d) +'>',0x0e; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x34; @ (0x40) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'[',0x2e; [ (0x5b) +'\',0x61; \ (0x5c) +']',0x36; ] (0x5d) +'_',0x4a; _ (0x5f) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x3e; { (0x7b) +'|',0x3d; | (0x7c) +'}',0x46; } (0x7d) +'~',0x31; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/colemak_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/colemak_acc @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (colemak_acc : Colemak ergonomic alternative) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/cz =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/cz @@ -0,0 +1,11 @@ +# bhyve ps2kbd keyboard layout file +# (cz : Czech (QWERTZ, accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +')',0x9b; ) (0x29) +'*',0xb7; * (0x2a) +'+',0x82; + (0x2b) + Index: usr.sbin/bhyve/kbdlayout/de =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/de @@ -0,0 +1,37 @@ +# bhyve ps2kbd keyboard layout file +# (de : German) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'#',0x5d; # (0x23) +'&',0x36; & (0x26) +''',0x5d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x15; @ (0x40) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x0e; ^ (0x5e) +'_',0x4a; _ (0x5f) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x3d; { (0x7b) +'|',0x61; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/de_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/de_acc @@ -0,0 +1,36 @@ +# bhyve ps2kbd keyboard layout file +# (de_acc : German (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'#',0x5d; # (0x23) +'&',0x36; & (0x26) +''',0x5d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x15; @ (0x40) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x0e; ^ (0x5e) +'_',0x4a; _ (0x5f) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x3d; { (0x7b) +'|',0x61; | (0x7c) +'}',0x45; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/de_noacc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/de_noacc @@ -0,0 +1,38 @@ +# bhyve ps2kbd keyboard layout file +# (de_noacc : German (no accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'#',0x5d; # (0x23) +'&',0x36; & (0x26) +''',0x55; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x15; @ (0x40) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x0e; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x3d; { (0x7b) +'|',0x61; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/default =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/default @@ -0,0 +1,248 @@ +# bhyve ps2kbd keyboard layout file (US - default) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +# for those who create the Keyboard Layout File. ****************************** +# To create the keyboard layout file, first copy this 'default' file into the +# same dir. with the layout name as the file name. +# The file name is a character string that can be specified as it is in the +# -k option of the bhyve command, so a normal language name is desirable. +# Then, it is necessary to define the difference between the standard US keyboard +# and the keyboard for each language according to the setting method described +# in the comment below. +# +# Note that lines starting with '#' and blank lines are ignored. +# In addition, the definition of the standard layout setting (US keyboard) +# is described as a comment line below for reference. +# So you usually only need to remove the '#' and fix it to the correct ScanCode +# only on the lines of the key that you can't type correctly with the standard +# US keyboard settings. + + +# Alphabet/Number/Sign Key ---------------------------------------------------- +# Format: +# 'Chr',ScanCode(Hex); +# or +# AsciiCode(Hex),ScanCode(Hex); +# +# If there are ASCII characters that cannot be entered correctly with the +# standard settings(US Keyboard layout), delete the "#" at the beginning of the +# relevant line below and set the correct ScanCode. +# +# For example, when a Japanese Keyboard is used, the '@' sign cannot be input +# correctly and the number '2' is input. +# This is because the US keyboard can input the '@' sign with the Shift + number'2' +# keys, and the ScanCode of the '@' sign is the number '2' key by default. +# In this case, remove the '#' at the beginning of the line with the '@' sign +# below and correct the ScanCode from 0x1e to 0x54 so that you can enter it +# correctly. +# ScanCode differs depending on the keyboard of eash language, so check it on +# the Internet. +# Note that keys that have no problems with input have the same settings as +# the US keyboard, so you do not need to set anything below. +# See the "/usr/share/bhyve/kbdlayout/jp106" file for the specific setting method. + +# '!',0x16; ! (0x21) +# '"',0x52; " (0x22) +# '#',0x26; # (0x23) +# '$',0x25; $ (0x24) +# '%',0x2e; % (0x25) +# '&',0x3d; & (0x26) +# ''',0x52; ' (0x27) +# '(',0x46; ( (0x28) +# ')',0x45; ) (0x29) +# '*',0x3e; * (0x2a) +# '+',0x55; + (0x2b) +# ',',0x41; , (0x2c) +# '-',0x4e; - (0x2d) +# '.',0x49; . (0x2e) +# '/',0x4a; / (0x2f) + +# '0',0x45; 0 (0x30) +# '1',0x16; 1 (0x31) +# '2',0x1e; 2 (0x32) +# '3',0x26; 3 (0x33) +# '4',0x25; 4 (0x34) +# '5',0x2e; 5 (0x35) +# '6',0x36; 6 (0x36) +# '7',0x3d; 7 (0x37) +# '8',0x3e; 8 (0x38) +# '9',0x46; 9 (0x39) +# ':',0x4c; : (0x3a) +# ';',0x4c; ; (0x3b) +# '<',0x41; < (0x3c) +# '=',0x55; = (0x3d) +# '>',0x49; > (0x3e) +# '?',0x4a; ? (0x3f) + +# '@',0x1e; @ (0x40) +# 'A',0x1c; A (0x41) +# 'B',0x32; B (0x42) +# 'C',0x21; C (0x43) +# 'D',0x23; D (0x44) +# 'E',0x24; E (0x45) +# 'F',0x2b; F (0x46) +# 'G',0x34; G (0x47) +# 'H',0x33; H (0x48) +# 'I',0x43; I (0x49) +# 'J',0x3b; J (0x4a) +# 'K',0x42; K (0x4b) +# 'L',0x4b; L (0x4c) +# 'M',0x3a; M (0x4d) +# 'N',0x31; N (0x4e) +# 'O',0x44; O (0x4f) + +# 'P',0x4d; P (0x50) +# 'Q',0x15; Q (0x51) +# 'R',0x2d; R (0x52) +# 'S',0x1b; S (0x53) +# 'T',0x2c; T (0x54) +# 'U',0x3c; U (0x55) +# 'V',0x2a; V (0x56) +# 'W',0x1d; W (0x57) +# 'X',0x22; X (0x58) +# 'Y',0x35; Y (0x59) +# 'Z',0x1a; Z (0x5a) +# '[',0x54; [ (0x5b) +# '\',0x5d; \ (0x5c) +# ']',0x5b; ] (0x5d) +# '^',0x36; ^ (0x5e) +# '_',0x4e; _ (0x5f) + +# '`',0x0e; ` (0x60) +# 'a',0x1c; a (0x61) +# 'b',0x32; b (0x62) +# 'c',0x21; c (0x63) +# 'd',0x23; d (0x64) +# 'e',0x24; e (0x65) +# 'f',0x2b; f (0x66) +# 'g',0x34; g (0x67) +# 'h',0x33; h (0x68) +# 'i',0x43; i (0x69) +# 'j',0x3b; j (0x6a) +# 'k',0x42; k (0x6b) +# 'l',0x4b; l (0x6c) +# 'm',0x3a; m (0x6d) +# 'n',0x31; n (0x6e) +# 'o',0x44; o (0x6f) + +# 'p',0x4d; p (0x70) +# 'q',0x15; q (0x71) +# 'r',0x2d; r (0x72) +# 's',0x1b; s (0x73) +# 't',0x2c; t (0x74) +# 'u',0x3c; u (0x75) +# 'v',0x2a; v (0x76) +# 'w',0x1d; w (0x77) +# 'x',0x22; x (0x78) +# 'y',0x35; y (0x79) +# 'z',0x1a; z (0x7a) +# '{',0x54; { (0x7b) +# '|',0x5d; | (0x7c) +# '}',0x5b; } (0x7d) +# '~',0x0e; ~ (0x7e) + + +# Functional Key -------------------------------------------------------------- +# Format: +# Xorg KeySym(Hex:2Byte),ScanCode(Hex); +# or +# Xorg KeySym(Hex:2Byte),ScanCode(Hex),Prefix(Hex); +# +# Key definitions other than alphanumeric characters such as Enter and Escape +# are set in this section. +# If there is a key that can not be entered correctly with the standard settings +# (US Keyboard layout),, delete the '#' at the beginning of the corresponding +# line and set the correct scan code. +# The Xorg KeySym Code can be checked by using the 'xev' command from X window +# on the guest OS. +# In addition, some keys have ScanCodes that have a Prefix Byte. +# In this case, define '0xe0' as the third argument.(example Home Key,etc) +# Note that keys that have no problems with input have the same settings as +# the US keyboard, so you do not need to set anything below. +# See the "/usr/share/bhyve/kbdlayout/jp106" file for the specific setting method. + +# 0xff08,0x66; Back space +# 0xff09,0x0d; Tab +# 0xff0d,0x5a; Return +# 0xff1b,0x76; Escape +# 0xff50,0x6c,0xe0; Home +# 0xff51,0x6b,0xe0; Left arrow +# 0xff52,0x75,0xe0; Up arrow +# 0xff53,0x74,0xe0; Right arrow +# 0xff54,0x72,0xe0; Down arrow +# 0xff55,0x7d,0xe0; PgUp +# 0xff56,0x7a,0xe0; PgDown +# 0xff57,0x69,0xe0; End +# 0xff63,0x70,0xe0; Ins +# 0xff8d,0x5a,0xe0; Keypad Enter +# 0xffe1,0x12; Left shift +# 0xffe2,0x59; Right shift +# 0xffe3,0x14; Left control +# 0xffe4,0x14,0xe0; Right control +# 0xffe9,0x11; Left alt +# 0xfe03,0x11,0xe0; AltGr +# 0xffea,0x11,0xe0; Right alt +# 0xffeb,0x1f,0xe0; Left Windows +# 0xffec,0x27,0xe0; Right Windows +# 0xffbe,0x05; F1 +# 0xffbf,0x06; F2 +# 0xffc0,0x04; F3 +# 0xffc1,0x0c; F4 +# 0xffc2,0x03; F5 +# 0xffc3,0x0b; F6 +# 0xffc4,0x83; F7 +# 0xffc5,0x0a; F8 +# 0xffc6,0x01; F9 +# 0xffc7,0x09; F10 +# 0xffc8,0x78; F11 +# 0xffc9,0x07; F12 +# 0xffff,0x71,0xe0; Del +# 0xff14,0x7e; ScrollLock + + +# NumLock and Keypads --------------------------------------------------------- +# +# The numeric keypad settings are the same as the Functional Key section above. + +# 0xff7f,0x77; NumLock +# 0xffaf,0x4a,0xe0; Keypad slash +# 0xffaa,0x7c; Keypad asterisk +# 0xffad,0x7b; Keypad minus +# 0xffab,0x79; Keypad plus +# 0xffb7,0x6c; Keypad 7 +# 0xff95,0x6c; Keypad home +# 0xffb8,0x75; Keypad 8 +# 0xff97,0x75; Keypad up arrow +# 0xffb9,0x7d; Keypad 9 +# 0xff9a,0x7d; Keypad PgUp +# 0xffb4,0x6b; Keypad 4 +# 0xff96,0x6b; Keypad left arrow +# 0xffb5,0x73; Keypad 5 +# 0xff9d,0x73; Keypad empty +# 0xffb6,0x74; Keypad 6 +# 0xff98,0x74; Keypad right arrow +# 0xffb1,0x69; Keypad 1 +# 0xff9c,0x69; Keypad end +# 0xffb2,0x72; Keypad 2 +# 0xff99,0x72; Keypad down arrow +# 0xffb3,0x7a; Keypad 3 +# 0xff9b,0x7a; Keypad PgDown +# 0xffb0,0x70; Keypad 0 +# 0xff9e,0x70; Keypad ins +# 0xffae,0x71; Keypad . +# 0xff9f,0x71; Keypad del + + +# Language Specific Key -------------------------------------------------------- +# +# If a key not exist in the US keyboard is added to the keyboard of each language, +# it is necessary to add the combination of Xorg KeySym and ScanCode of the +# corresponding key. +# The setting format is the same as the Functional Key section above. +# example: +# 0xff2a,0x0e; Hankaku/Zenkaku|Kanji (Japanese 106 keyboard original Key) + + Index: usr.sbin/bhyve/kbdlayout/dk =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/dk @@ -0,0 +1,32 @@ +# bhyve ps2kbd keyboard layout file +# (dk : Danish) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x5b; " (0x22) +'&',0x36; & (0x26) +''',0x55; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x4e; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'[',0x3e; [ (0x5b) +'\',0x61; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x5b; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x55; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/dk_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/dk_acc @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (dk_acc : Danish (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/dk_macbook =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/dk_macbook @@ -0,0 +1,35 @@ +# bhyve ps2kbd keyboard layout file +# (dk_macbook : Danish (macbook)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'$',0x0e; $ (0x24) +'&',0x36; & (0x26) +''',0x5d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x4e; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x5d; @ (0x40) +'G',0x7a,0xe0; G (0x47) +'I',0x6c,0xe0; I (0x49) +'O',0x69,0xe0; O (0x4f) +'Q',0x7d,0xe0; Q (0x51) +'[',0x3e; [ (0x5b) +'\',0x61; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x5b; ^ (0x5e) +'_',0x4a; _ (0x5f) +'|',0x43; | (0x7c) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/ee =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ee @@ -0,0 +1,31 @@ +# bhyve ps2kbd keyboard layout file +# (ee : Nordic layout on Asus eeePC Estonian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x5d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x4e; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x52; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x61; | (0x7c) +'}',0x45; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/es =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/es @@ -0,0 +1,28 @@ +# bhyve ps2kbd keyboard layout file +# (es : Spanish (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'\',0x0e; \ (0x5c) +'_',0x4a; _ (0x5f) +'{',0x52; { (0x7b) +'|',0x16; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x25; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/es_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/es_acc @@ -0,0 +1,28 @@ +# bhyve ps2kbd keyboard layout file +# (es_acc : Spanish (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'\',0x0e; \ (0x5c) +'_',0x4a; _ (0x5f) +'{',0x52; { (0x7b) +'|',0x16; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x25; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/es_dvorak =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/es_dvorak @@ -0,0 +1,78 @@ +# bhyve ps2kbd keyboard layout file +# (es_dvorak : Spanish Dvorak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +',',0x1d; , (0x2c) +'-',0x1a; - (0x2d) +'.',0x15; . (0x2e) +':',0x15; : (0x3a) +';',0x1d; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'B',0x31; B (0x42) +'C',0x43; C (0x43) +'D',0x33; D (0x44) +'E',0x23; E (0x45) +'F',0x35; F (0x46) +'G',0x3c; G (0x47) +'H',0x44; H (0x48) +'I',0x34; I (0x49) +'J',0x21; J (0x4a) +'K',0x2a; K (0x4b) +'L',0x4d; L (0x4c) +'N',0x4b; N (0x4e) +'O',0x1b; O (0x4f) +'P',0x2d; P (0x50) +'Q',0x22; Q (0x51) +'R',0x3b; R (0x52) +'S',0x4c; S (0x53) +'T',0x42; T (0x54) +'U',0x2b; U (0x55) +'V',0x49; V (0x56) +'W',0x41; W (0x57) +'X',0x32; X (0x58) +'Y',0x2c; Y (0x59) +'Z',0x4a; Z (0x5a) +'\',0x0e; \ (0x5c) +'_',0x1a; _ (0x5f) +'b',0x31; b (0x62) +'c',0x43; c (0x63) +'d',0x33; d (0x64) +'e',0x23; e (0x65) +'f',0x35; f (0x66) +'g',0x3c; g (0x67) +'h',0x44; h (0x68) +'i',0x34; i (0x69) +'j',0x21; j (0x6a) +'k',0x2a; k (0x6b) +'l',0x4d; l (0x6c) +'n',0x4b; n (0x6e) +'o',0x1b; o (0x6f) +'p',0x2d; p (0x70) +'q',0x22; q (0x71) +'r',0x3b; r (0x72) +'s',0x4c; s (0x73) +'t',0x42; t (0x74) +'u',0x2b; u (0x75) +'v',0x49; v (0x76) +'w',0x41; w (0x77) +'x',0x32; x (0x78) +'y',0x2c; y (0x79) +'z',0x4a; z (0x7a) +'{',0x52; { (0x7b) +'|',0x0e; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x25; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/fi =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/fi @@ -0,0 +1,32 @@ +# bhyve ps2kbd keyboard layout file +# (fi : Finnish) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x5d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x4e; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x5b; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x4c; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/fr =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/fr @@ -0,0 +1,46 @@ +# bhyve ps2kbd keyboard layout file +# (fr : French French Canadian (accent keys) Swiss-French) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x4a; ! (0x21) +'"',0x26; " (0x22) +'$',0x5b; $ (0x24) +'%',0x52; % (0x25) +'&',0x16; & (0x26) +''',0x25; ' (0x27) +'(',0x2e; ( (0x28) +')',0x4e; ) (0x29) +'*',0x5d; * (0x2a) +',',0x3a; , (0x2c) +'-',0x36; - (0x2d) +'.',0x41; . (0x2e) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'>',0x61; > (0x3e) +'?',0x3a; ? (0x3f) +'@',0x45; @ (0x40) +'A',0x15; A (0x41) +'M',0x4c; M (0x4d) +'Q',0x1c; Q (0x51) +'W',0x1a; W (0x57) +'Z',0x1d; Z (0x5a) +'[',0x2e; [ (0x5b) +'\',0x3e; \ (0x5c) +']',0x4e; ] (0x5d) +'^',0x46; ^ (0x5e) +'_',0x3e; _ (0x5f) +'`',0x3d; ` (0x60) +'a',0x15; a (0x61) +'m',0x4c; m (0x6d) +'q',0x1c; q (0x71) +'w',0x1a; w (0x77) +'z',0x1d; z (0x7a) +'{',0x25; { (0x7b) +'|',0x36; | (0x7c) +'}',0x55; } (0x7d) +'~',0x1e; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/fr_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/fr_acc @@ -0,0 +1,46 @@ +# bhyve ps2kbd keyboard layout file +# (fr_acc : French (accent keys) Swiss-French (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x4a; ! (0x21) +'"',0x26; " (0x22) +'$',0x5b; $ (0x24) +'%',0x52; % (0x25) +'&',0x16; & (0x26) +''',0x25; ' (0x27) +'(',0x2e; ( (0x28) +')',0x4e; ) (0x29) +'*',0x5d; * (0x2a) +',',0x3a; , (0x2c) +'-',0x36; - (0x2d) +'.',0x41; . (0x2e) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'>',0x61; > (0x3e) +'?',0x3a; ? (0x3f) +'@',0x45; @ (0x40) +'A',0x15; A (0x41) +'M',0x4c; M (0x4d) +'Q',0x1c; Q (0x51) +'W',0x1a; W (0x57) +'Z',0x1d; Z (0x5a) +'[',0x2e; [ (0x5b) +'\',0x3e; \ (0x5c) +']',0x4e; ] (0x5d) +'^',0x46; ^ (0x5e) +'_',0x3e; _ (0x5f) +'`',0x3d; ` (0x60) +'a',0x15; a (0x61) +'m',0x4c; m (0x6d) +'q',0x1c; q (0x71) +'w',0x1a; w (0x77) +'z',0x1d; z (0x7a) +'{',0x25; { (0x7b) +'|',0x36; | (0x7c) +'}',0x55; } (0x7d) +'~',0x1e; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/fr_dvorak =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/fr_dvorak @@ -0,0 +1,87 @@ +# bhyve ps2kbd keyboard layout file +# (fr_dvorak : French Dvorak-like) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x2c; ! (0x21) +'"',0x45; " (0x22) +'#',0x5d; # (0x23) +'%',0x55; % (0x25) +'&',0x5b; & (0x26) +''',0x1d; ' (0x27) +'(',0x3d; ( (0x28) +')',0x46; ) (0x29) +'*',0x61; * (0x2a) +'+',0x61; + (0x2b) +',',0x21; , (0x2c) +'-',0x26; - (0x2d) +'.',0x2c; . (0x2e) +'/',0x2e; / (0x2f) +':',0x15; : (0x3a) +';',0x1a; ; (0x3b) +'<',0x1d; < (0x3c) +'=',0x16; = (0x3d) +'>',0x24; > (0x3e) +'?',0x15; ? (0x3f) +'@',0x1a; @ (0x40) +'A',0x1b; A (0x41) +'B',0x34; B (0x42) +'C',0x43; C (0x43) +'D',0x4c; D (0x44) +'E',0x2b; E (0x45) +'F',0x33; F (0x46) +'G',0x2d; G (0x47) +'H',0x35; H (0x48) +'I',0x2a; I (0x49) +'J',0x4a; J (0x4a) +'K',0x4d; K (0x4b) +'L',0x41; L (0x4c) +'M',0x44; M (0x4d) +'N',0x4b; N (0x4e) +'O',0x1c; O (0x4f) +'P',0x49; P (0x50) +'Q',0x22; Q (0x51) +'R',0x3a; R (0x52) +'S',0x3b; S (0x53) +'T',0x42; T (0x54) +'U',0x23; U (0x55) +'V',0x3c; V (0x56) +'W',0x52; W (0x57) +'X',0x31; X (0x58) +'Y',0x32; Y (0x59) +'Z',0x54; Z (0x5a) +'[',0x4e; [ (0x5b) +'\',0x21; \ (0x5c) +']',0x55; ] (0x5d) +'`',0x3e; ` (0x60) +'a',0x1b; a (0x61) +'b',0x34; b (0x62) +'c',0x43; c (0x63) +'d',0x4c; d (0x64) +'e',0x2b; e (0x65) +'f',0x33; f (0x66) +'g',0x2d; g (0x67) +'h',0x35; h (0x68) +'i',0x2a; i (0x69) +'j',0x4a; j (0x6a) +'k',0x4d; k (0x6b) +'l',0x41; l (0x6c) +'m',0x44; m (0x6d) +'n',0x4b; n (0x6e) +'o',0x1c; o (0x6f) +'p',0x49; p (0x70) +'q',0x22; q (0x71) +'r',0x3a; r (0x72) +'s',0x3b; s (0x73) +'t',0x42; t (0x74) +'u',0x23; u (0x75) +'v',0x3c; v (0x76) +'w',0x52; w (0x77) +'x',0x31; x (0x78) +'y',0x32; y (0x79) +'z',0x54; z (0x7a) +'|',0x4e; | (0x7c) +'~',0x5d; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/fr_dvorak_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/fr_dvorak_acc @@ -0,0 +1,86 @@ +# bhyve ps2kbd keyboard layout file +# (fr_dvorak_acc : French Dvorak-like (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x2c; ! (0x21) +'"',0x45; " (0x22) +'#',0x5d; # (0x23) +'%',0x55; % (0x25) +'&',0x5b; & (0x26) +''',0x1d; ' (0x27) +'(',0x3d; ( (0x28) +')',0x46; ) (0x29) +'*',0x0e; * (0x2a) +'+',0x4e; + (0x2b) +',',0x21; , (0x2c) +'-',0x26; - (0x2d) +'.',0x2c; . (0x2e) +'/',0x1e; / (0x2f) +':',0x15; : (0x3a) +';',0x1a; ; (0x3b) +'<',0x1d; < (0x3c) +'=',0x16; = (0x3d) +'>',0x24; > (0x3e) +'?',0x15; ? (0x3f) +'@',0x21; @ (0x40) +'A',0x1b; A (0x41) +'B',0x34; B (0x42) +'C',0x43; C (0x43) +'D',0x4c; D (0x44) +'E',0x2b; E (0x45) +'F',0x33; F (0x46) +'G',0x2d; G (0x47) +'H',0x35; H (0x48) +'I',0x2a; I (0x49) +'J',0x4a; J (0x4a) +'K',0x4d; K (0x4b) +'L',0x41; L (0x4c) +'M',0x44; M (0x4d) +'N',0x4b; N (0x4e) +'O',0x1c; O (0x4f) +'P',0x49; P (0x50) +'Q',0x22; Q (0x51) +'R',0x3a; R (0x52) +'S',0x3b; S (0x53) +'T',0x42; T (0x54) +'U',0x23; U (0x55) +'V',0x3c; V (0x56) +'W',0x52; W (0x57) +'X',0x31; X (0x58) +'Y',0x32; Y (0x59) +'Z',0x54; Z (0x5a) +'[',0x4e; [ (0x5b) +'\',0x2e; \ (0x5c) +']',0x55; ] (0x5d) +'_',0x0e; _ (0x5f) +'a',0x1b; a (0x61) +'b',0x34; b (0x62) +'c',0x43; c (0x63) +'d',0x4c; d (0x64) +'e',0x2b; e (0x65) +'f',0x33; f (0x66) +'g',0x2d; g (0x67) +'h',0x35; h (0x68) +'i',0x2a; i (0x69) +'j',0x4a; j (0x6a) +'k',0x4d; k (0x6b) +'l',0x41; l (0x6c) +'m',0x44; m (0x6d) +'n',0x4b; n (0x6e) +'o',0x1c; o (0x6f) +'p',0x49; p (0x70) +'q',0x22; q (0x71) +'r',0x3a; r (0x72) +'s',0x3b; s (0x73) +'t',0x42; t (0x74) +'u',0x23; u (0x75) +'v',0x3c; v (0x76) +'w',0x52; w (0x77) +'x',0x31; x (0x78) +'y',0x32; y (0x79) +'z',0x54; z (0x7a) +'|',0x1a; | (0x7c) + Index: usr.sbin/bhyve/kbdlayout/fr_macbook =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/fr_macbook @@ -0,0 +1,49 @@ +# bhyve ps2kbd keyboard layout file +# (fr_macbook : French Macbook/Macbook Pro (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x3e; ! (0x21) +'"',0x26; " (0x22) +'#',0x0e; # (0x23) +'$',0x5b; $ (0x24) +'%',0x52; % (0x25) +'&',0x16; & (0x26) +''',0x25; ' (0x27) +'(',0x2e; ( (0x28) +')',0x4e; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x4a; + (0x2b) +',',0x3a; , (0x2c) +'-',0x55; - (0x2d) +'.',0x41; . (0x2e) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x4a; = (0x3d) +'>',0x61; > (0x3e) +'?',0x3a; ? (0x3f) +'@',0x0e; @ (0x40) +'A',0x15; A (0x41) +'M',0x4c; M (0x4d) +'Q',0x1c; Q (0x51) +'W',0x1a; W (0x57) +'Z',0x1d; Z (0x5a) +'[',0x2e; [ (0x5b) +'\',0x3e; \ (0x5c) +']',0x4e; ] (0x5d) +'^',0x46; ^ (0x5e) +'_',0x55; _ (0x5f) +'`',0x3d; ` (0x60) +'a',0x15; a (0x61) +'m',0x4c; m (0x6d) +'q',0x1c; q (0x71) +'w',0x1a; w (0x77) +'z',0x1d; z (0x7a) +'{',0x25; { (0x7b) +'|',0x36; | (0x7c) +'}',0x55; } (0x7d) +'~',0x1e; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/gr =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/gr @@ -0,0 +1,9 @@ +# bhyve ps2kbd keyboard layout file +# (gr : Greek (104 keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/gr_101_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/gr_101_acc @@ -0,0 +1,9 @@ +# bhyve ps2kbd keyboard layout file +# (gr_101_acc : Greek (101 keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/gr_elot_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/gr_elot_acc @@ -0,0 +1,17 @@ +# bhyve ps2kbd keyboard layout file +# (gr_elot_acc : Greek ELOT) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'#',0x5d; # (0x23) +''',0x0e; ' (0x27) +'*',0xb7; * (0x2a) +'/',0x52; / (0x2f) +'@',0x52; @ (0x40) +'\',0x61; \ (0x5c) +'|',0x61; | (0x7c) +'~',0x5d; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/hr =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/hr @@ -0,0 +1,36 @@ +# bhyve ps2kbd keyboard layout file +# (hr : Croatian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x55; * (0x2a) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x2a; @ (0x40) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'[',0x2b; [ (0x5b) +'\',0x15; \ (0x5c) +']',0x34; ] (0x5d) +'^',0x26; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x3d; ` (0x60) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x32; { (0x7b) +'|',0x1d; | (0x7c) +'}',0x31; } (0x7d) +'~',0x16; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/hu_101 =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/hu_101 @@ -0,0 +1,9 @@ +# bhyve ps2kbd keyboard layout file +# (hu_101 : Hungarian (101 keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/hu_102 =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/hu_102 @@ -0,0 +1,41 @@ +# bhyve ps2kbd keyboard layout file +# (hu_102 : Hungarian (102 keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x25; ! (0x21) +'"',0x1e; " (0x22) +'#',0x22; # (0x23) +'$',0x4c; $ (0x24) +'&',0x21; & (0x26) +''',0x16; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x4a; * (0x2a) +'+',0x26; + (0x2b) +'-',0x4a; - (0x2d) +'0',0x0e; 0 (0x30) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x3a; < (0x3c) +'=',0x3d; = (0x3d) +'>',0x1a; > (0x3e) +'?',0x41; ? (0x3f) +'@',0x2a; @ (0x40) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'[',0x2b; [ (0x5b) +'\',0x15; \ (0x5c) +']',0x34; ] (0x5d) +'^',0x26; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x3d; ` (0x60) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x32; { (0x7b) +'|',0x1d; | (0x7c) +'}',0x31; } (0x7d) +'~',0x16; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/il =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/il @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (il : Hebrew) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/is =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/is @@ -0,0 +1,33 @@ +# bhyve ps2kbd keyboard layout file +# (is : Icelandic) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x5b; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x5d; + (0x2b) +'-',0x55; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x5b; ? (0x3f) +'@',0x15; @ (0x40) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x0e; ^ (0x5e) +'_',0x55; _ (0x5f) +'`',0x5d; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x4c; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/is_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/is_acc @@ -0,0 +1,32 @@ +# bhyve ps2kbd keyboard layout file +# (is_acc : Icelandic (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x5b; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x5d; + (0x2b) +'-',0x55; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x5b; ? (0x3f) +'@',0x15; @ (0x40) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'_',0x55; _ (0x5f) +'`',0x5d; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x4c; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/it =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/it @@ -0,0 +1,34 @@ +# bhyve ps2kbd keyboard layout file +# (it : Italian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'#',0x52; # (0x23) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x15; @ (0x40) +'[',0x3e; [ (0x5b) +'\',0x0e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x55; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x4e; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x0e; | (0x7c) +'}',0x45; } (0x7d) +'~',0x55; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/jp =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/jp @@ -0,0 +1,36 @@ +# bhyve ps2kbd keyboard layout file +# (jp : Japanese 106) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +# Alphabet/Number/Sign Key ---------------------------------------------------- +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x3d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x52; * (0x2a) +'+',0x4c; + (0x2b) +':',0x52; : (0x3a) +'=',0x4e; = (0x3d) +'@',0x54; @ (0x40) +'[',0x5b; [ (0x5b) +'\',0x51; \ (0x5c) +']',0x5d; ] (0x5d) +'^',0x55; ^ (0x5e) +'_',0x51; _ (0x5f) +'`',0x54; ` (0x60) +'{',0x5b; { (0x7b) +'|',0x6a; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x55; ~ (0x7e) + +# Language Specific Key ------------------------------------------------------- +0xff2a,0x0e; Hankaku/Zenkaku|Kanji +0xffe5,0x58; CapsLock +0xff22,0x67; Muhenkan +0xff23,0x64; Henkan_Mode +0xff27,0x13; Katakana-Hiragana/RomaJi + Index: usr.sbin/bhyve/kbdlayout/jp_capsctrl =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/jp_capsctrl @@ -0,0 +1,37 @@ +# bhyve ps2kbd keyboard layout file +# (jp.capsctrl : Japanese 106x) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +# Alphabet/Number/Sign Key ---------------------------------------------------- +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x3d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x52; * (0x2a) +'+',0x4c; + (0x2b) +':',0x52; : (0x3a) +'=',0x4e; = (0x3d) +'@',0x54; @ (0x40) +'[',0x5b; [ (0x5b) +'\',0x51; \ (0x5c) +']',0x5d; ] (0x5d) +'^',0x55; ^ (0x5e) +'_',0x51; _ (0x5f) +'`',0x54; ` (0x60) +'{',0x5b; { (0x7b) +'|',0x6a; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x55; ~ (0x7e) + +# Language Specific Key ------------------------------------------------------- +0xff2a,0x0e; Hankaku/Zenkaku|Kanji +0xffe5,0x58; CapsLock +0xff22,0x67; Muhenkan +0xff23,0x64; Henkan_Mode +0xff27,0x13; Katakana-Hiragana/RomaJi +0xffe3,0x58; Left control + Index: usr.sbin/bhyve/kbdlayout/kz_io =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/kz_io @@ -0,0 +1,11 @@ +# bhyve ps2kbd keyboard layout file +# (kz_io : Kazakh) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x82; " (0x22) +'(',0xa9; ( (0x28) +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/kz_kst =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/kz_kst @@ -0,0 +1,11 @@ +# bhyve ps2kbd keyboard layout file +# (kz_kst : Kazakh) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x82; " (0x22) +'(',0xa9; ( (0x28) +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/latinamerican =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/latinamerican @@ -0,0 +1,33 @@ +# bhyve ps2kbd keyboard layout file +# (latinamerican : Latin American) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x15; @ (0x40) +'[',0x52; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x5d; ] (0x5d) +'^',0x52; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x5d; ` (0x60) +'{',0x52; { (0x7b) +'|',0x0e; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/latinamerican_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/latinamerican_acc @@ -0,0 +1,31 @@ +# bhyve ps2kbd keyboard layout file +# (latinamerican_acc : Latin American (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x15; @ (0x40) +'[',0x52; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x5d; ] (0x5d) +'_',0x4a; _ (0x5f) +'{',0x52; { (0x7b) +'|',0x0e; | (0x7c) +'}',0x5d; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/lt =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/lt @@ -0,0 +1,10 @@ +# bhyve ps2kbd keyboard layout file +# (lt : Lithuanian Ukrainian (with Russian) (shift)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) +0xffea,0x61; Right alt + Index: usr.sbin/bhyve/kbdlayout/nl =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/nl @@ -0,0 +1,31 @@ +# bhyve ps2kbd keyboard layout file +# (nl : Dutch (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x45; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5b; * (0x2a) +'+',0x4c; + (0x2b) +'-',0x4a; - (0x2d) +'/',0x4e; / (0x2f) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x5d; < (0x3c) +'=',0x4a; = (0x3d) +'>',0x5d; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x0e; @ (0x40) +'[',0x61; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x61; ] (0x5d) +'_',0x3d; _ (0x5f) +'{',0x3e; { (0x7b) +'|',0x5b; | (0x7c) +'}',0x46; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/no =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/no @@ -0,0 +1,32 @@ +# bhyve ps2kbd keyboard layout file +# (no : Norwegian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x5d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x4e; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'[',0x3e; [ (0x5b) +'\',0x55; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x5b; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x0e; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/no_dvorak =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/no_dvorak @@ -0,0 +1,81 @@ +# bhyve ps2kbd keyboard layout file +# (no_dvorak : Norwegian dvorak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x54; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x54; * (0x2a) +'+',0x4e; + (0x2b) +',',0x1d; , (0x2c) +'-',0x52; - (0x2d) +'.',0x24; . (0x2e) +':',0x24; : (0x3a) +';',0x1d; ; (0x3b) +'<',0x5d; < (0x3c) +'=',0x45; = (0x3d) +'>',0x5d; > (0x3e) +'?',0x4e; ? (0x3f) +'B',0x31; B (0x42) +'C',0x43; C (0x43) +'D',0x33; D (0x44) +'E',0x23; E (0x45) +'F',0x35; F (0x46) +'G',0x3c; G (0x47) +'H',0x3b; H (0x48) +'I',0x34; I (0x49) +'J',0x21; J (0x4a) +'K',0x2a; K (0x4b) +'L',0x4d; L (0x4c) +'N',0x4b; N (0x4e) +'O',0x1b; O (0x4f) +'P',0x2d; P (0x50) +'Q',0x22; Q (0x51) +'R',0x44; R (0x52) +'S',0x4c; S (0x53) +'T',0x42; T (0x54) +'U',0x2b; U (0x55) +'V',0x49; V (0x56) +'W',0x41; W (0x57) +'X',0x32; X (0x58) +'Y',0x2c; Y (0x59) +'Z',0x4a; Z (0x5a) +'[',0x3e; [ (0x5b) +'\',0x55; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x5b; ^ (0x5e) +'_',0x52; _ (0x5f) +'`',0x55; ` (0x60) +'b',0x31; b (0x62) +'c',0x43; c (0x63) +'d',0x33; d (0x64) +'e',0x23; e (0x65) +'f',0x35; f (0x66) +'g',0x3c; g (0x67) +'h',0x3b; h (0x68) +'i',0x34; i (0x69) +'j',0x21; j (0x6a) +'k',0x2a; k (0x6b) +'l',0x4d; l (0x6c) +'n',0x4b; n (0x6e) +'o',0x1b; o (0x6f) +'p',0x2d; p (0x70) +'q',0x22; q (0x71) +'r',0x44; r (0x72) +'s',0x4c; s (0x73) +'t',0x42; t (0x74) +'u',0x2b; u (0x75) +'v',0x49; v (0x76) +'w',0x41; w (0x77) +'x',0x32; x (0x78) +'y',0x2c; y (0x79) +'z',0x4a; z (0x7a) +'{',0x3d; { (0x7b) +'|',0x0e; | (0x7c) +'}',0x45; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/nordic_asus-eee =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/nordic_asus-eee @@ -0,0 +1,32 @@ +# bhyve ps2kbd keyboard layout file +# (nordic_asus-eee : Nordic layout on Asus eeePC) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x5d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x4e; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x5b; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x4c; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/pl =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/pl @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (pl : Polish (programmer's)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/pl_dvorak =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/pl_dvorak @@ -0,0 +1,74 @@ +# bhyve ps2kbd keyboard layout file +# (pl_dvorak : Polish Dvorak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x15; " (0x22) +''',0x15; ' (0x27) +'+',0x5b; + (0x2b) +',',0x1d; , (0x2c) +'-',0x52; - (0x2d) +'.',0x24; . (0x2e) +'/',0x54; / (0x2f) +':',0x1a; : (0x3a) +';',0x1a; ; (0x3b) +'<',0x1d; < (0x3c) +'=',0x5b; = (0x3d) +'>',0x24; > (0x3e) +'?',0x54; ? (0x3f) +'B',0x31; B (0x42) +'C',0x43; C (0x43) +'D',0x33; D (0x44) +'E',0x23; E (0x45) +'F',0x35; F (0x46) +'G',0x3c; G (0x47) +'H',0x3b; H (0x48) +'I',0x34; I (0x49) +'J',0x21; J (0x4a) +'K',0x2a; K (0x4b) +'L',0x4d; L (0x4c) +'N',0x4b; N (0x4e) +'O',0x1b; O (0x4f) +'P',0x2d; P (0x50) +'Q',0x22; Q (0x51) +'R',0x44; R (0x52) +'S',0x4c; S (0x53) +'T',0x42; T (0x54) +'U',0x2b; U (0x55) +'V',0x49; V (0x56) +'W',0x41; W (0x57) +'X',0x32; X (0x58) +'Y',0x2c; Y (0x59) +'Z',0x4a; Z (0x5a) +'[',0x4e; [ (0x5b) +']',0x55; ] (0x5d) +'_',0x52; _ (0x5f) +'b',0x31; b (0x62) +'c',0x43; c (0x63) +'d',0x33; d (0x64) +'e',0x23; e (0x65) +'f',0x35; f (0x66) +'g',0x3c; g (0x67) +'h',0x3b; h (0x68) +'i',0x34; i (0x69) +'j',0x21; j (0x6a) +'k',0x2a; k (0x6b) +'l',0x4d; l (0x6c) +'n',0x4b; n (0x6e) +'o',0x1b; o (0x6f) +'p',0x2d; p (0x70) +'q',0x22; q (0x71) +'r',0x44; r (0x72) +'s',0x4c; s (0x73) +'t',0x42; t (0x74) +'u',0x2b; u (0x75) +'v',0x49; v (0x76) +'w',0x41; w (0x77) +'x',0x32; x (0x78) +'y',0x2c; y (0x79) +'z',0x4a; z (0x7a) +'{',0x4e; { (0x7b) +'}',0x55; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/pt =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/pt @@ -0,0 +1,31 @@ +# bhyve ps2kbd keyboard layout file +# (pt : Portuguese) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x54; * (0x2a) +'+',0x54; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'[',0x3e; [ (0x5b) +'\',0x0e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x5d; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x5b; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x0e; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5d; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/pt_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/pt_acc @@ -0,0 +1,28 @@ +# bhyve ps2kbd keyboard layout file +# (pt_acc : Portuguese (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x54; * (0x2a) +'+',0x54; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'[',0x3e; [ (0x5b) +'\',0x0e; \ (0x5c) +']',0x46; ] (0x5d) +'_',0x4a; _ (0x5f) +'{',0x3d; { (0x7b) +'|',0x0e; | (0x7c) +'}',0x45; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/ru =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ru @@ -0,0 +1,14 @@ +# bhyve ps2kbd keyboard layout file +# (ru : Russian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x82; ! (0x21) +'"',0x00; " (0x22) +'(',0x8a; ( (0x28) +')',0x8b; ) (0x29) +'*',0x85; * (0x2a) +':',0x86; : (0x3a) + Index: usr.sbin/bhyve/kbdlayout/ru_shift =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ru_shift @@ -0,0 +1,9 @@ +# bhyve ps2kbd keyboard layout file +# (ru_shift : Russian (shift)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/ru_win =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ru_win @@ -0,0 +1,9 @@ +# bhyve ps2kbd keyboard layout file +# (ru_win : Russian (winkeys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/se =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/se @@ -0,0 +1,32 @@ +# bhyve ps2kbd keyboard layout file +# (se : Swedish) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x5d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x5d; * (0x2a) +'+',0x4e; + (0x2b) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x5b; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x55; ` (0x60) +'{',0x3d; { (0x7b) +'|',0x4c; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/si =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/si @@ -0,0 +1,36 @@ +# bhyve ps2kbd keyboard layout file +# (si : Slovenian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x4e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x55; * (0x2a) +'-',0x4a; - (0x2d) +':',0x49; : (0x3a) +';',0x41; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x2a; @ (0x40) +'Y',0x1a; Y (0x59) +'Z',0x35; Z (0x5a) +'[',0x2b; [ (0x5b) +'\',0x15; \ (0x5c) +']',0x34; ] (0x5d) +'^',0x26; ^ (0x5e) +'_',0x4a; _ (0x5f) +'`',0x3d; ` (0x60) +'y',0x1a; y (0x79) +'z',0x35; z (0x7a) +'{',0x32; { (0x7b) +'|',0x1d; | (0x7c) +'}',0x31; } (0x7d) +'~',0x16; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/sk =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/sk @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (sk : Slovak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/tr =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/tr @@ -0,0 +1,36 @@ +# bhyve ps2kbd keyboard layout file +# (tr : Turkish (Q)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x0e; " (0x22) +'&',0x36; & (0x26) +''',0x1e; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x4e; * (0x2a) +'+',0x25; + (0x2b) +',',0x5d; , (0x2c) +'-',0x55; - (0x2d) +'.',0x4a; . (0x2e) +':',0x4a; : (0x3a) +';',0x5d; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x15; @ (0x40) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x26; ^ (0x5e) +'_',0x55; _ (0x5f) +'`',0x5d; ` (0x60) +'i',0x52; i (0x69) +'{',0x3d; { (0x7b) +'|',0x61; | (0x7c) +'}',0x45; } (0x7d) +'~',0x5b; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/tr_f =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/tr_f @@ -0,0 +1,81 @@ +# bhyve ps2kbd keyboard layout file +# (tr_f : Turkish (F)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'&',0x36; & (0x26) +''',0x3d; ' (0x27) +'(',0x3e; ( (0x28) +')',0x46; ) (0x29) +'*',0x0e; * (0x2a) +'+',0x0e; + (0x2b) +',',0x4a; , (0x2c) +'-',0x55; - (0x2d) +'/',0x4e; / (0x2f) +':',0x49; : (0x3a) +';',0x4a; ; (0x3b) +'<',0x61; < (0x3c) +'=',0x45; = (0x3d) +'>',0x61; > (0x3e) +'?',0x4e; ? (0x3f) +'@',0x15; @ (0x40) +'A',0x2b; A (0x41) +'B',0x41; B (0x42) +'C',0x2a; C (0x43) +'D',0x35; D (0x44) +'E',0x23; E (0x45) +'F',0x15; F (0x46) +'G',0x1d; G (0x47) +'H',0x44; H (0x48) +'I',0x2d; I (0x49) +'J',0x1a; J (0x4a) +'K',0x3b; K (0x4b) +'M',0x42; M (0x4d) +'N',0x43; N (0x4e) +'O',0x2c; O (0x4f) +'Q',0x54; Q (0x51) +'R',0x3c; R (0x52) +'S',0x3a; S (0x53) +'T',0x33; T (0x54) +'U',0x1c; U (0x55) +'V',0x21; V (0x56) +'W',0x5b; W (0x57) +'X',0x5d; X (0x58) +'Y',0x4c; Y (0x59) +'Z',0x31; Z (0x5a) +'[',0x3e; [ (0x5b) +'\',0x4e; \ (0x5c) +']',0x46; ] (0x5d) +'^',0x26; ^ (0x5e) +'_',0x55; _ (0x5f) +'a',0x2b; a (0x61) +'b',0x41; b (0x62) +'c',0x2a; c (0x63) +'d',0x35; d (0x64) +'e',0x23; e (0x65) +'f',0x15; f (0x66) +'g',0x1d; g (0x67) +'h',0x44; h (0x68) +'i',0x1b; i (0x69) +'j',0x1a; j (0x6a) +'k',0x3b; k (0x6b) +'m',0x42; m (0x6d) +'n',0x43; n (0x6e) +'o',0x2c; o (0x6f) +'q',0x54; q (0x71) +'r',0x3c; r (0x72) +'s',0x3a; s (0x73) +'t',0x33; t (0x74) +'u',0x1c; u (0x75) +'v',0x21; v (0x76) +'w',0x5b; w (0x77) +'x',0x5d; x (0x78) +'y',0x4c; y (0x79) +'z',0x31; z (0x7a) +'{',0x3d; { (0x7b) +'|',0x55; | (0x7c) +'}',0x45; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/ua =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ua @@ -0,0 +1,9 @@ +# bhyve ps2kbd keyboard layout file +# (ua : Ukrainian) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) + Index: usr.sbin/bhyve/kbdlayout/ua_shift_alt =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/ua_shift_alt @@ -0,0 +1,10 @@ +# bhyve ps2kbd keyboard layout file +# (ua_shift_alt : Ukrainian (with Russian) (shift)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'*',0xb7; * (0x2a) +0xffb5,0x71; Keypad 5 + Index: usr.sbin/bhyve/kbdlayout/uk =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/uk @@ -0,0 +1,14 @@ +# bhyve ps2kbd keyboard layout file +# (uk : United Kingdom) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'#',0x5d; # (0x23) +'@',0x52; @ (0x40) +'\',0x61; \ (0x5c) +'|',0x61; | (0x7c) +'~',0x5d; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/uk_capsctrl =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/uk_capsctrl @@ -0,0 +1,14 @@ +# bhyve ps2kbd keyboard layout file +# (uk_capsctrl : United Kingdom (Caps Lock acts as Left Ctrl)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'#',0x5d; # (0x23) +'@',0x52; @ (0x40) +'\',0x61; \ (0x5c) +'|',0x61; | (0x7c) +'~',0x5d; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/uk_dvorak =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/uk_dvorak @@ -0,0 +1,78 @@ +# bhyve ps2kbd keyboard layout file +# (uk_dvorak : United Kingdom Dvorak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x1e; " (0x22) +'#',0x5d; # (0x23) +''',0x15; ' (0x27) +'+',0x5b; + (0x2b) +',',0x1d; , (0x2c) +'-',0x52; - (0x2d) +'.',0x24; . (0x2e) +'/',0x54; / (0x2f) +':',0x1a; : (0x3a) +';',0x1a; ; (0x3b) +'<',0x1d; < (0x3c) +'=',0x5b; = (0x3d) +'>',0x24; > (0x3e) +'?',0x54; ? (0x3f) +'@',0x15; @ (0x40) +'B',0x31; B (0x42) +'C',0x43; C (0x43) +'D',0x33; D (0x44) +'E',0x23; E (0x45) +'F',0x35; F (0x46) +'G',0x3c; G (0x47) +'H',0x3b; H (0x48) +'I',0x34; I (0x49) +'J',0x21; J (0x4a) +'K',0x2a; K (0x4b) +'L',0x4d; L (0x4c) +'N',0x4b; N (0x4e) +'O',0x1b; O (0x4f) +'P',0x2d; P (0x50) +'Q',0x22; Q (0x51) +'R',0x44; R (0x52) +'S',0x4c; S (0x53) +'T',0x42; T (0x54) +'U',0x2b; U (0x55) +'V',0x49; V (0x56) +'W',0x41; W (0x57) +'X',0x32; X (0x58) +'Y',0x2c; Y (0x59) +'Z',0x4a; Z (0x5a) +'[',0x4e; [ (0x5b) +'\',0x61; \ (0x5c) +']',0x55; ] (0x5d) +'_',0x52; _ (0x5f) +'b',0x31; b (0x62) +'c',0x43; c (0x63) +'d',0x33; d (0x64) +'e',0x23; e (0x65) +'f',0x35; f (0x66) +'g',0x3c; g (0x67) +'h',0x3b; h (0x68) +'i',0x34; i (0x69) +'j',0x21; j (0x6a) +'k',0x2a; k (0x6b) +'l',0x4d; l (0x6c) +'n',0x4b; n (0x6e) +'o',0x1b; o (0x6f) +'p',0x2d; p (0x70) +'q',0x22; q (0x71) +'r',0x44; r (0x72) +'s',0x4c; s (0x73) +'t',0x42; t (0x74) +'u',0x2b; u (0x75) +'v',0x49; v (0x76) +'w',0x41; w (0x77) +'x',0x32; x (0x78) +'y',0x2c; y (0x79) +'z',0x4a; z (0x7a) +'{',0x4e; { (0x7b) +'|',0x61; | (0x7c) +'}',0x55; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/uk_macbook =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/uk_macbook @@ -0,0 +1,10 @@ +# bhyve ps2kbd keyboard layout file +# (uk_macbook : United Kingdom Macbook) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'`',0x61; ` (0x60) +'~',0x61; ~ (0x7e) + Index: usr.sbin/bhyve/kbdlayout/us =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (us : United States of America) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/us_acc =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_acc @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (us_acc : United States of America (accent keys)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/us_ctrl =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_ctrl @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (us_ctrl : United States of America (Caps Lock acts as Left Ctrl)) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/us_dvorak =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_dvorak @@ -0,0 +1,74 @@ +# bhyve ps2kbd keyboard layout file +# (us_dvorak : United States of America dvorak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x15; " (0x22) +''',0x15; ' (0x27) +'+',0x5b; + (0x2b) +',',0x1d; , (0x2c) +'-',0x52; - (0x2d) +'.',0x24; . (0x2e) +'/',0x54; / (0x2f) +':',0x1a; : (0x3a) +';',0x1a; ; (0x3b) +'<',0x1d; < (0x3c) +'=',0x5b; = (0x3d) +'>',0x24; > (0x3e) +'?',0x54; ? (0x3f) +'B',0x31; B (0x42) +'C',0x43; C (0x43) +'D',0x33; D (0x44) +'E',0x23; E (0x45) +'F',0x35; F (0x46) +'G',0x3c; G (0x47) +'H',0x3b; H (0x48) +'I',0x34; I (0x49) +'J',0x21; J (0x4a) +'K',0x2a; K (0x4b) +'L',0x4d; L (0x4c) +'N',0x4b; N (0x4e) +'O',0x1b; O (0x4f) +'P',0x2d; P (0x50) +'Q',0x22; Q (0x51) +'R',0x44; R (0x52) +'S',0x4c; S (0x53) +'T',0x42; T (0x54) +'U',0x2b; U (0x55) +'V',0x49; V (0x56) +'W',0x41; W (0x57) +'X',0x32; X (0x58) +'Y',0x2c; Y (0x59) +'Z',0x4a; Z (0x5a) +'[',0x4e; [ (0x5b) +']',0x55; ] (0x5d) +'_',0x52; _ (0x5f) +'b',0x31; b (0x62) +'c',0x43; c (0x63) +'d',0x33; d (0x64) +'e',0x23; e (0x65) +'f',0x35; f (0x66) +'g',0x3c; g (0x67) +'h',0x3b; h (0x68) +'i',0x34; i (0x69) +'j',0x21; j (0x6a) +'k',0x2a; k (0x6b) +'l',0x4d; l (0x6c) +'n',0x4b; n (0x6e) +'o',0x1b; o (0x6f) +'p',0x2d; p (0x70) +'q',0x22; q (0x71) +'r',0x44; r (0x72) +'s',0x4c; s (0x73) +'t',0x42; t (0x74) +'u',0x2b; u (0x75) +'v',0x49; v (0x76) +'w',0x41; w (0x77) +'x',0x32; x (0x78) +'y',0x2c; y (0x79) +'z',0x4a; z (0x7a) +'{',0x4e; { (0x7b) +'}',0x55; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/us_dvorakl =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_dvorakl @@ -0,0 +1,88 @@ +# bhyve ps2kbd keyboard layout file +# (us_dvorakl : United States of America lefthand dvorak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x55; ! (0x21) +'"',0x1a; " (0x22) +'#',0x45; # (0x23) +'$',0x46; $ (0x24) +'%',0x54; % (0x25) +'&',0x52; & (0x26) +''',0x1a; ' (0x27) +'(',0x4a; ( (0x28) +')',0x49; ) (0x29) +'*',0x4c; * (0x2a) +'+',0x5b; + (0x2b) +'-',0x1c; - (0x2d) +'.',0x44; . (0x2e) +'/',0x26; / (0x2f) +'0',0x49; 0 (0x30) +'1',0x55; 1 (0x31) +'2',0x4e; 2 (0x32) +'3',0x45; 3 (0x33) +'4',0x46; 4 (0x34) +'5',0x54; 5 (0x35) +'6',0x4d; 6 (0x36) +'7',0x52; 7 (0x37) +'8',0x4c; 8 (0x38) +'9',0x4a; 9 (0x39) +':',0x15; : (0x3a) +';',0x15; ; (0x3b) +'=',0x5b; = (0x3d) +'>',0x44; > (0x3e) +'?',0x26; ? (0x3f) +'@',0x4e; @ (0x40) +'A',0x42; A (0x41) +'B',0x24; B (0x42) +'C',0x23; C (0x43) +'D',0x2b; D (0x44) +'E',0x3b; E (0x45) +'F',0x2e; F (0x46) +'G',0x21; G (0x47) +'I',0x3a; I (0x49) +'J',0x3e; J (0x4a) +'K',0x1b; K (0x4b) +'L',0x3d; L (0x4c) +'M',0x36; M (0x4d) +'O',0x43; O (0x4f) +'P',0x25; P (0x50) +'Q',0x1d; Q (0x51) +'R',0x3c; R (0x52) +'S',0x35; S (0x53) +'T',0x34; T (0x54) +'U',0x2c; U (0x55) +'W',0x32; W (0x57) +'Y',0x2d; Y (0x59) +'Z',0x4b; Z (0x5a) +'[',0x16; [ (0x5b) +']',0x1e; ] (0x5d) +'^',0x4d; ^ (0x5e) +'_',0x1c; _ (0x5f) +'a',0x42; a (0x61) +'b',0x24; b (0x62) +'c',0x23; c (0x63) +'d',0x2b; d (0x64) +'e',0x3b; e (0x65) +'f',0x2e; f (0x66) +'g',0x21; g (0x67) +'i',0x3a; i (0x69) +'j',0x3e; j (0x6a) +'k',0x1b; k (0x6b) +'l',0x3d; l (0x6c) +'m',0x36; m (0x6d) +'o',0x43; o (0x6f) +'p',0x25; p (0x70) +'q',0x1d; q (0x71) +'r',0x3c; r (0x72) +'s',0x35; s (0x73) +'t',0x34; t (0x74) +'u',0x2c; u (0x75) +'w',0x32; w (0x77) +'y',0x2d; y (0x79) +'z',0x4b; z (0x7a) +'{',0x16; { (0x7b) +'}',0x1e; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/us_dvorakp =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_dvorakp @@ -0,0 +1,95 @@ +# bhyve ps2kbd keyboard layout file +# (us_dvorakp : United States of America Programmer Dvorak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'!',0x4e; ! (0x21) +'"',0x1a; " (0x22) +'#',0x55; # (0x23) +'$',0x0e; $ (0x24) +'%',0x16; % (0x25) +'&',0x16; & (0x26) +''',0x1a; ' (0x27) +'(',0x2e; ( (0x28) +')',0x3e; ) (0x29) +'*',0x3d; * (0x2a) +'+',0x46; + (0x2b) +',',0x1d; , (0x2c) +'-',0x52; - (0x2d) +'.',0x24; . (0x2e) +'/',0x54; / (0x2f) +'0',0x3d; 0 (0x30) +'1',0x2e; 1 (0x31) +'2',0x3e; 2 (0x32) +'3',0x25; 3 (0x33) +'4',0x46; 4 (0x34) +'5',0x26; 5 (0x35) +'6',0x45; 6 (0x36) +'7',0x1e; 7 (0x37) +'8',0x4e; 8 (0x38) +'9',0x36; 9 (0x39) +':',0x15; : (0x3a) +';',0x15; ; (0x3b) +'<',0x1d; < (0x3c) +'=',0x36; = (0x3d) +'>',0x24; > (0x3e) +'?',0x54; ? (0x3f) +'@',0x5b; @ (0x40) +'B',0x31; B (0x42) +'C',0x43; C (0x43) +'D',0x33; D (0x44) +'E',0x23; E (0x45) +'F',0x35; F (0x46) +'G',0x3c; G (0x47) +'H',0x3b; H (0x48) +'I',0x34; I (0x49) +'J',0x21; J (0x4a) +'K',0x2a; K (0x4b) +'L',0x4d; L (0x4c) +'N',0x4b; N (0x4e) +'O',0x1b; O (0x4f) +'P',0x2d; P (0x50) +'Q',0x22; Q (0x51) +'R',0x44; R (0x52) +'S',0x4c; S (0x53) +'T',0x42; T (0x54) +'U',0x2b; U (0x55) +'V',0x49; V (0x56) +'W',0x41; W (0x57) +'X',0x32; X (0x58) +'Y',0x2c; Y (0x59) +'Z',0x4a; Z (0x5a) +'[',0x1e; [ (0x5b) +']',0x45; ] (0x5d) +'^',0x5b; ^ (0x5e) +'_',0x52; _ (0x5f) +'`',0x55; ` (0x60) +'b',0x31; b (0x62) +'c',0x43; c (0x63) +'d',0x33; d (0x64) +'e',0x23; e (0x65) +'f',0x35; f (0x66) +'g',0x3c; g (0x67) +'h',0x3b; h (0x68) +'i',0x34; i (0x69) +'j',0x21; j (0x6a) +'k',0x2a; k (0x6b) +'l',0x4d; l (0x6c) +'n',0x4b; n (0x6e) +'o',0x1b; o (0x6f) +'p',0x2d; p (0x70) +'q',0x22; q (0x71) +'r',0x44; r (0x72) +'s',0x4c; s (0x73) +'t',0x42; t (0x74) +'u',0x2b; u (0x75) +'v',0x49; v (0x76) +'w',0x41; w (0x77) +'x',0x32; x (0x78) +'y',0x2c; y (0x79) +'z',0x4a; z (0x7a) +'{',0x26; { (0x7b) +'}',0x25; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/us_dvorakr =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_dvorakr @@ -0,0 +1,86 @@ +# bhyve ps2kbd keyboard layout file +# (us_dvorakr : United States of America righthand dvorak) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x4a; " (0x22) +'%',0x15; % (0x25) +'&',0x1c; & (0x26) +''',0x4a; ' (0x27) +'(',0x1a; ( (0x28) +')',0x22; ) (0x29) +'*',0x1b; * (0x2a) +'+',0x5b; + (0x2b) +',',0x2a; , (0x2c) +'-',0x52; - (0x2d) +'.',0x2d; . (0x2e) +'/',0x45; / (0x2f) +'0',0x22; 0 (0x30) +'5',0x15; 5 (0x35) +'6',0x1d; 6 (0x36) +'7',0x1c; 7 (0x37) +'8',0x1b; 8 (0x38) +'9',0x1a; 9 (0x39) +':',0x54; : (0x3a) +';',0x54; ; (0x3b) +'<',0x2a; < (0x3c) +'=',0x5b; = (0x3d) +'>',0x2d; > (0x3e) +'?',0x45; ? (0x3f) +'A',0x2b; A (0x41) +'B',0x4d; B (0x42) +'C',0x4b; C (0x43) +'D',0x42; D (0x44) +'E',0x34; E (0x45) +'F',0x3e; F (0x46) +'G',0x49; G (0x47) +'I',0x32; I (0x49) +'J',0x2e; J (0x4a) +'K',0x4c; K (0x4b) +'L',0x36; L (0x4c) +'M',0x3d; M (0x4d) +'O',0x2c; O (0x4f) +'P',0x46; P (0x50) +'Q',0x24; Q (0x51) +'R',0x35; R (0x52) +'S',0x3c; S (0x53) +'T',0x3b; T (0x54) +'U',0x43; U (0x55) +'V',0x41; V (0x56) +'W',0x3a; W (0x57) +'X',0x21; X (0x58) +'Y',0x44; Y (0x59) +'Z',0x23; Z (0x5a) +'[',0x4e; [ (0x5b) +']',0x55; ] (0x5d) +'^',0x1d; ^ (0x5e) +'_',0x52; _ (0x5f) +'a',0x2b; a (0x61) +'b',0x4d; b (0x62) +'c',0x4b; c (0x63) +'d',0x42; d (0x64) +'e',0x34; e (0x65) +'f',0x3e; f (0x66) +'g',0x49; g (0x67) +'i',0x32; i (0x69) +'j',0x2e; j (0x6a) +'k',0x4c; k (0x6b) +'l',0x36; l (0x6c) +'m',0x3d; m (0x6d) +'o',0x2c; o (0x6f) +'p',0x46; p (0x70) +'q',0x24; q (0x71) +'r',0x35; r (0x72) +'s',0x3c; s (0x73) +'t',0x3b; t (0x74) +'u',0x43; u (0x75) +'v',0x41; v (0x76) +'w',0x3a; w (0x77) +'x',0x21; x (0x78) +'y',0x44; y (0x79) +'z',0x23; z (0x7a) +'{',0x4e; { (0x7b) +'}',0x55; } (0x7d) + Index: usr.sbin/bhyve/kbdlayout/us_dvorakx =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_dvorakx @@ -0,0 +1,80 @@ +# bhyve ps2kbd keyboard layout file +# (us_dvorakx : United States of America dvorakx) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'"',0x15; " (0x22) +''',0x15; ' (0x27) +'+',0x5d; + (0x2b) +',',0x1d; , (0x2c) +'-',0x52; - (0x2d) +'.',0x24; . (0x2e) +'/',0x54; / (0x2f) +':',0x1a; : (0x3a) +';',0x1a; ; (0x3b) +'<',0x1d; < (0x3c) +'=',0x5d; = (0x3d) +'>',0x24; > (0x3e) +'?',0x54; ? (0x3f) +'B',0x31; B (0x42) +'C',0x43; C (0x43) +'D',0x33; D (0x44) +'E',0x23; E (0x45) +'F',0x35; F (0x46) +'G',0x3c; G (0x47) +'H',0x3b; H (0x48) +'I',0x34; I (0x49) +'J',0x21; J (0x4a) +'K',0x2a; K (0x4b) +'L',0x4d; L (0x4c) +'N',0x4b; N (0x4e) +'O',0x1b; O (0x4f) +'P',0x2d; P (0x50) +'Q',0x22; Q (0x51) +'R',0x44; R (0x52) +'S',0x4c; S (0x53) +'T',0x42; T (0x54) +'U',0x2b; U (0x55) +'V',0x49; V (0x56) +'W',0x41; W (0x57) +'X',0x32; X (0x58) +'Y',0x2c; Y (0x59) +'Z',0x4a; Z (0x5a) +'[',0x4e; [ (0x5b) +'\',0x5b; \ (0x5c) +']',0x55; ] (0x5d) +'_',0x52; _ (0x5f) +'`',0x76; ` (0x60) +'b',0x31; b (0x62) +'c',0x43; c (0x63) +'d',0x33; d (0x64) +'e',0x23; e (0x65) +'f',0x35; f (0x66) +'g',0x3c; g (0x67) +'h',0x3b; h (0x68) +'i',0x34; i (0x69) +'j',0x21; j (0x6a) +'k',0x2a; k (0x6b) +'l',0x4d; l (0x6c) +'n',0x4b; n (0x6e) +'o',0x1b; o (0x6f) +'p',0x2d; p (0x70) +'q',0x22; q (0x71) +'r',0x44; r (0x72) +'s',0x4c; s (0x73) +'t',0x42; t (0x74) +'u',0x2b; u (0x75) +'v',0x49; v (0x76) +'w',0x41; w (0x77) +'x',0x32; x (0x78) +'y',0x2c; y (0x79) +'z',0x4a; z (0x7a) +'{',0x4e; { (0x7b) +'|',0x5b; | (0x7c) +'}',0x55; } (0x7d) +'~',0x76; ~ (0x7e) +0xff1b,0x0e; Escape +0xffe3,0x58; Left control + Index: usr.sbin/bhyve/kbdlayout/us_emacs =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_emacs @@ -0,0 +1,9 @@ +# bhyve ps2kbd keyboard layout file +# (us_emacs : United States of America Emacs optimized layout) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +0xffff,0x66; Del + Index: usr.sbin/bhyve/kbdlayout/us_macbook =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_macbook @@ -0,0 +1,8 @@ +# bhyve ps2kbd keyboard layout file +# (us_macbook : United States of America Macbook/Macbook Pro ISO-8859-1) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + + Index: usr.sbin/bhyve/kbdlayout/us_unix =================================================================== --- /dev/null +++ usr.sbin/bhyve/kbdlayout/us_unix @@ -0,0 +1,14 @@ +# bhyve ps2kbd keyboard layout file +# (us_unix : United States of America Traditional Unix Workstation) +# +# Create by: Koine Yuusuke(koinec) +# +# $FreeBSD$ + +'`',0x76; ` (0x60) +'~',0x76; ~ (0x7e) +0xff08,0x71; Back space +0xff1b,0x0e; Escape +0xffe3,0x58; Left control +0xffff,0x66; Del + Index: usr.sbin/bhyve/ps2kbd.c =================================================================== --- usr.sbin/bhyve/ps2kbd.c +++ usr.sbin/bhyve/ps2kbd.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include @@ -42,7 +43,10 @@ #include #include #include +#include +#include +#include "bhyverun.h" #include "atkbdc.h" #include "debug.h" #include "console.h" @@ -62,6 +66,8 @@ #define PS2KBD_FIFOSZ 16 +#define PS2KBD_LAYOUT_BASEDIR "/usr/share/bhyve/kbdlayout/" + struct fifo { uint8_t buf[PS2KBD_FIFOSZ]; int rindex; /* index to read from */ @@ -90,7 +96,7 @@ /* * FIXME: Pause/break and Print Screen/SysRq require special handling. */ -static const struct extended_translation extended_translations[] = { +static struct extended_translation extended_translations[128] = { {0xff08, 0x66}, /* Back space */ {0xff09, 0x0d}, /* Tab */ {0xff0d, 0x5a}, /* Return */ @@ -162,7 +168,7 @@ }; /* ASCII to type 2 scancode lookup table */ -static const uint8_t ascii_translations[128] = { +static uint8_t ascii_translations[128] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -181,6 +187,26 @@ 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x0e, 0x00, }; +/* ScanCode set1 to set2 lookup table */ +const uint8_t keyset1to2_translations[128] = { + 0, 0x76, 0x16, 0x1E, 0x26, 0x25, 0x2e, 0x36, + 0x3d, 0x3e, 0x46, 0x45, 0x4e, 0x55, 0x66, 0x0d, + 0x15, 0x1d, 0x24, 0x2d, 0x2c, 0x35, 0x3c, 0x43, + 0x44, 0x4d, 0x54, 0x5b, 0x5a, 0x14, 0x1c, 0x1b, + 0x23, 0x2b, 0x34, 0x33, 0x3b, 0x42, 0x4b, 0x4c, + 0x52, 0x0e, 0x12, 0x5d, 0x1a, 0x22, 0x21, 0x2a, + 0x32, 0x31, 0x3a, 0x41, 0x49, 0x4a, 0x59, 0x7c, + 0x11, 0x29, 0x58, 0x05, 0x06, 0x04, 0x0c, 0x03, + 0x0b, 0x83, 0x0a, 0x01, 0x09, 0x77, 0x7e, 0x6c, + 0x75, 0x7d, 0x7b, 0x6b, 0x73, 0x74, 0x79, 0x69, + 0x72, 0x7a, 0x70, 0x71, 0x84, 0x60, 0x61, 0x78, + 0x07, 0x0f, 0x17, 0x1f, 0x27, 0x2f, 0x37, 0x3f, + 0x47, 0x4f, 0x56, 0x5e, 0x08, 0x10, 0x18, 0x20, + 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x57, 0x6f, + 0x13, 0x19, 0x39, 0x51, 0x53, 0x5c, 0x5f, 0x62, + 0x63, 0x64, 0x65, 0x67, 0x68, 0x6a, 0x6d, 0x6e, +}; + static void fifo_init(struct ps2kbd_softc *sc) { @@ -315,26 +341,32 @@ */ static void ps2kbd_keysym_queue(struct ps2kbd_softc *sc, - int down, uint32_t keysym) + int down, uint32_t keysym, uint32_t keycode) { assert(pthread_mutex_isowned_np(&sc->mtx)); int e0_prefix, found; uint8_t code; - const struct extended_translation *trans; + struct extended_translation *trans; - found = 0; - if (keysym < 0x80) { - code = ascii_translations[keysym]; - e0_prefix = 0; + if (keycode) { + code = keyset1to2_translations[(uint8_t)(keycode & 0x7f)]; + e0_prefix = ((keycode & 0x80) ? SCANCODE_E0_PREFIX : 0); found = 1; } else { - for (trans = &(extended_translations[0]); trans->keysym != 0; - trans++) { - if (keysym == trans->keysym) { - code = trans->scancode; - e0_prefix = trans->flags & SCANCODE_E0_PREFIX; - found = 1; - break; + found = 0; + if (keysym < 0x80) { + code = ascii_translations[keysym]; + e0_prefix = 0; + found = 1; + } else { + for (trans = &(extended_translations[0]); trans->keysym != 0; + trans++) { + if (keysym == trans->keysym) { + code = trans->scancode; + e0_prefix = trans->flags & SCANCODE_E0_PREFIX; + found = 1; + break; + } } } } @@ -352,7 +384,7 @@ } static void -ps2kbd_event(int down, uint32_t keysym, void *arg) +ps2kbd_event(int down, uint32_t keysym, uint32_t keycode, void *arg) { struct ps2kbd_softc *sc = arg; int fifo_full; @@ -363,18 +395,99 @@ return; } fifo_full = sc->fifo.num == PS2KBD_FIFOSZ; - ps2kbd_keysym_queue(sc, down, keysym); + ps2kbd_keysym_queue(sc, down, keysym, keycode); pthread_mutex_unlock(&sc->mtx); if (!fifo_full) atkbdc_event(sc->atkbdc_sc, 1); } +static void +ps2kbd_update_extended_translation(uint32_t keycode, uint32_t scancode, uint32_t prefix) +{ + int i = 0; + + do { + if (extended_translations[i].keysym == keycode) + break; + } while(extended_translations[++i].keysym); + + if (i == (sizeof(extended_translations) / sizeof(struct extended_translation) - 1)) + return; + + if (!extended_translations[i].keysym) { + extended_translations[i].keysym = keycode; + + extended_translations[i+1].keysym = 0; + extended_translations[i+1].scancode = 0; + extended_translations[i+1].flags = 0; + } + + extended_translations[i].scancode = (uint8_t)(scancode & 0xff); + extended_translations[i].flags = (prefix ? SCANCODE_E0_PREFIX : 0); +} + +static void +ps2kbd_setkbdlayout(void) +{ + int err; + int fd; + char path[256]; + char *buf, *next, *line; + struct stat sb; + size_t sz; + uint8_t ascii; + uint32_t keycode, scancode, prefix; + + strcpy(path, PS2KBD_LAYOUT_BASEDIR); + strncat(path, kbdlayout_name, (sizeof(path) - strlen(PS2KBD_LAYOUT_BASEDIR) - 1)); + + err = stat(path, &sb); + if (err) + return; + + buf = (char *)malloc(sizeof(char) * sb.st_size); + if (buf == NULL) + return; + + fd = open(path, O_RDONLY); + if (fd == -1) + goto out; + + sz = read(fd, buf, sb.st_size ); + + close(fd); + + if (sz != sb.st_size ) + goto out; + + next = buf; + while ((line = strsep(&next, "\n")) != NULL) { + if (sscanf(line, "'%c',%x;", &ascii, &scancode) == 2) { + if (ascii < 0x80) + ascii_translations[ascii] = (uint8_t)(scancode & 0xff); + } else if (sscanf(line, "%x,%x,%x;", &keycode, &scancode, &prefix) == 3 ) { + ps2kbd_update_extended_translation(keycode, scancode, prefix); + } else if (sscanf(line, "%x,%x;", &keycode, &scancode) == 2) { + if (keycode < 0x80) + ascii_translations[(uint8_t)(keycode & 0xff)] = (uint8_t)(scancode & 0xff); + else + ps2kbd_update_extended_translation(keycode, scancode, 0); + } + } + +out: + free(buf); +} + struct ps2kbd_softc * ps2kbd_init(struct atkbdc_softc *atkbdc_sc) { struct ps2kbd_softc *sc; + if (kbdlayout_name != NULL) + ps2kbd_setkbdlayout(); + sc = calloc(1, sizeof (struct ps2kbd_softc)); pthread_mutex_init(&sc->mtx, NULL); fifo_init(sc); Index: usr.sbin/bhyve/rfb.c =================================================================== --- usr.sbin/bhyve/rfb.c +++ usr.sbin/bhyve/rfb.c @@ -98,6 +98,7 @@ #define CS_KEY_EVENT 4 #define CS_POINTER_EVENT 5 #define CS_CUT_TEXT 6 +#define CS_MSG_CLIENT_QEMU 255 #define SECURITY_TYPE_NONE 1 #define SECURITY_TYPE_VNC_AUTH 2 @@ -118,6 +119,9 @@ bool enc_raw_ok; bool enc_zlib_ok; bool enc_resize_ok; + bool enc_extkeyevent_ok; + + bool enc_extkeyevent_send; z_stream zstream; uint8_t *zbuf; @@ -170,6 +174,9 @@ #define RFB_ENCODING_RAW 0 #define RFB_ENCODING_ZLIB 6 #define RFB_ENCODING_RESIZE -223 +#define RFB_ENCODING_EXT_KEYEVENT -258 + +#define RFB_CLIENTMSG_EXT_KEYEVENT 0 #define RFB_MAX_WIDTH 2000 #define RFB_MAX_HEIGHT 1200 @@ -197,6 +204,19 @@ uint8_t type; uint8_t down; uint16_t pad; + uint32_t sym; +}; + +struct rfb_client_msg { + uint8_t type; + uint8_t subtype; +}; + +struct rfb_extended_key_msg { + uint8_t type; + uint8_t subtype; + uint16_t down; + uint32_t sym; uint32_t code; }; @@ -276,6 +296,27 @@ stream_write(cfd, &srect_hdr, sizeof(struct rfb_srvr_rect_hdr)); } +static void +rfb_send_extended_keyevent_update_msg(struct rfb_softc *rc, int cfd) +{ + struct rfb_srvr_updt_msg supdt_msg; + struct rfb_srvr_rect_hdr srect_hdr; + + /* Number of rectangles: 1 */ + supdt_msg.type = 0; + supdt_msg.pad = 0; + supdt_msg.numrects = htons(1); + stream_write(cfd, &supdt_msg, sizeof(struct rfb_srvr_updt_msg)); + + /* Rectangle header */ + srect_hdr.x = htons(0); + srect_hdr.y = htons(0); + srect_hdr.width = htons(rc->width); + srect_hdr.height = htons(rc->height); + srect_hdr.encoding = htonl(RFB_ENCODING_EXT_KEYEVENT); + stream_write(cfd, &srect_hdr, sizeof(struct rfb_srvr_rect_hdr)); +} + static void rfb_recv_set_pixfmt_msg(struct rfb_softc *rc, int cfd) { @@ -309,6 +350,9 @@ case RFB_ENCODING_RESIZE: rc->enc_resize_ok = true; break; + case RFB_ENCODING_EXT_KEYEVENT: + rc->enc_extkeyevent_ok = true; + break; } } } @@ -686,6 +730,11 @@ (void)stream_read(cfd, ((void *)&updt_msg) + 1 , sizeof(updt_msg) - 1); + if (rc->enc_extkeyevent_ok && (!rc->enc_extkeyevent_send)) { + rfb_send_extended_keyevent_update_msg(rc, cfd); + rc->enc_extkeyevent_send = true; + } + rc->pending = true; if (!updt_msg.incremental) rc->update_all = true; @@ -698,10 +747,25 @@ (void)stream_read(cfd, ((void *)&key_msg) + 1, sizeof(key_msg) - 1); - console_key_event(key_msg.down, htonl(key_msg.code)); + console_key_event(key_msg.down, htonl(key_msg.sym), htonl(0)); rc->input_detected = true; } +static void +rfb_recv_client_msg(struct rfb_softc *rc, int cfd) +{ + struct rfb_client_msg client_msg; + struct rfb_extended_key_msg extkey_msg; + + (void)stream_read(cfd, ((void *)&client_msg) + 1, sizeof(client_msg) - 1); + + if (client_msg.subtype == RFB_CLIENTMSG_EXT_KEYEVENT ) { + (void)stream_read(cfd, ((void *)&extkey_msg) + 2, sizeof(extkey_msg) - 2); + console_key_event((int)extkey_msg.down, htonl(extkey_msg.sym), htonl(extkey_msg.code)); + rc->input_detected = true; + } +} + static void rfb_recv_ptr_msg(struct rfb_softc *rc, int cfd) { @@ -997,6 +1061,9 @@ case CS_CUT_TEXT: rfb_recv_cuttext_msg(rc, cfd); break; + case CS_MSG_CLIENT_QEMU: + rfb_recv_client_msg(rc, cfd); + break; default: WPRINTF(("rfb unknown cli-code %d!", buf[0] & 0xff)); goto done; @@ -1031,6 +1098,9 @@ rc->enc_raw_ok = false; rc->enc_zlib_ok = false; rc->enc_resize_ok = false; + rc->enc_extkeyevent_ok = false; + + rc->enc_extkeyevent_send = false; cfd = accept(rc->sfd, NULL, NULL); if (rc->conn_wait) {