Hi Miod,

(cc'ing tech@ to see if anybody else has one of these keyboards)

Is this the correct way to go about adding a sub-keymap to place
the VT switch commands on dedicated keys?  For local use, I just
hacked up the standard keymap :-))).  Likewise the necessary
changes to wskbd.c to process these keys without control and alt
held down is missing, because I just did a bad hack on my local
copy to make it work, (and break all other keyboards).

For those who are interested, the 122 key mainframe keyboards
have F13-F24 on the top row, (which are supported by default
in the OpenBSD console), and 10 extra function keys on the left.

There is also an extra key in the cursor section, instead of
an inverted T, the cursor movement keys are in the shape of a
plus sign, (+), with a key in the middle.

Oh, and page up, page down, and escape are in the 'correct'
positions for real programmers.


--- wsksymdef.h.orig    Fri May 16 20:36:22 2014
+++ wsksymdef.h Fri May 16 20:44:18 2014
@@ -507,6 +507,7 @@
 #define KS_Henkan              0xf115  /* Alias for Henkan_Mode */
 #define KS_Muhenkan            0xf116  /* Cancel Conversion */
 #define KS_Mode_Lock           0xf117
+#define KS_Repeat              0xf118  /* Repeat key */
 
 /*
  * Group 2 (keypad) character in low byte
@@ -743,6 +744,7 @@
 #define KB_METAESC             0x00000020 /* generate ESC prefix on ALT-key */
 #define KB_IOPENER             0x00000040 /* f1-f12 -> ESC,f1-f11 */
 #define KB_MACHDEP             0x00000080 /* machine dependent */
+#define KB_TERM122             0x00000100 /* commands to dedicated keys on 122 
key terminal keyboards */
 #define KB_APPLE               0x00010000 /* Apple specific layout */
 #define KB_DEFAULT             0x80000000 /* (attach-only) default layout */
 
@@ -784,6 +786,7 @@
        { KB_DVORAK,    "dvorak" }, \
        { KB_METAESC,   "metaesc" }, \
        { KB_IOPENER,   "iopener" }, \
+       { KB_TERM122,   "term122" }, \
        { KB_MACHDEP,   "machdep" }, \
        { KB_APPLE,     "apple" }
 

--- wskbdmap_mfii.c.orig        Fri May 16 20:35:04 2014
+++ wskbdmap_mfii.c     Fri May 16 20:54:42 2014
@@ -172,6 +172,25 @@
 
 #if !defined(WSKBD_NO_INTL_LAYOUTS)
 
+static const keysym_t pckbd_keydesc_term122[] = {
+/*  pos      command           normal          shifted */
+
+    KC(1),                     KS_Escape,
+    KC(59),                    KS_f1,
+    KC(60),                    KS_f2,
+    KC(61),                    KS_f3,
+    KC(62),                    KS_f4,
+    KC(63),                    KS_f5,
+    KC(64),                    KS_f6,
+    KC(113),  KS_Cmd_Screen0,
+    KC(118),  KS_Cmd_Screen1,
+    KC(114),  KS_Cmd_Screen2,
+    KC(127),  KS_Cmd_Screen3,
+    KC(116),  KS_Cmd_Screen4,
+    KC(109),  KS_Cmd_Screen5,
+    KC(117),  KS_Cmd_Debugger,
+};
+
 static const keysym_t pckbd_keydesc_de[] = {
 /*  pos      normal            shifted         altgr           shift-altgr */
     KC(3),   KS_2,             KS_quotedbl,    KS_twosuperior,
@@ -1096,6 +1115,7 @@
        KBD_MAP(KB_US | KB_DVORAK,      KB_US,  pckbd_keydesc_us_dvorak),
        KBD_MAP(KB_US | KB_SWAPCTRLCAPS, KB_US, pckbd_keydesc_swapctrlcaps),
        KBD_MAP(KB_US | KB_IOPENER,     KB_US,  pckbd_keydesc_iopener),
+       KBD_MAP(KB_UK | KB_TERM122,     KB_UK,  pckbd_keydesc_term122),
        KBD_MAP(KB_UK | KB_SWAPCTRLCAPS, KB_UK, pckbd_keydesc_swapctrlcaps),
        KBD_MAP(KB_JP | KB_SWAPCTRLCAPS, KB_JP, pckbd_keydesc_swapctrlcaps),
        KBD_MAP(KB_FR | KB_SWAPCTRLCAPS, KB_FR, pckbd_keydesc_swapctrlcaps),

-- 
Creamy! <3

Reply via email to