13b6250d9Smckusick /* 2*4f00418dSbostic * Copyright (c) 1992, 1993 3*4f00418dSbostic * The Regents of the University of California. All rights reserved. 43b6250d9Smckusick * 53b6250d9Smckusick * This code is derived from software contributed to Berkeley by 63b6250d9Smckusick * Sony Corp. and Kazumasa Utashiro of Software Research Associates, Inc. 73b6250d9Smckusick * 83b6250d9Smckusick * %sccs.include.redist.c% 93b6250d9Smckusick * 103b6250d9Smckusick * from: $Hdr: kbreg.h,v 4.300 91/06/09 06:42:47 root Rel41 $ SONY 113b6250d9Smckusick * 12*4f00418dSbostic * @(#)kbreg.h 8.1 (Berkeley) 06/11/93 133b6250d9Smckusick */ 143b6250d9Smckusick 153b6250d9Smckusick #ifndef __KEYBOARD__ 163b6250d9Smckusick #define __KEYBOARD__ 1 173b6250d9Smckusick 183b6250d9Smckusick #define key_any(x) ((x) != -1) 193b6250d9Smckusick #define key_down(x) (((x) & 0x80) == 0) 203b6250d9Smckusick #define key_up(x) ((x) & 0x80) 213b6250d9Smckusick 223b6250d9Smckusick typedef struct key_string { 233b6250d9Smckusick int key_length; 243b6250d9Smckusick char *key_string; 253b6250d9Smckusick } Key_string; 263b6250d9Smckusick 273b6250d9Smckusick typedef struct pfk_table { 283b6250d9Smckusick int pfk_addr; 293b6250d9Smckusick Key_string pfk_normal; 303b6250d9Smckusick Key_string pfk_shift; 313b6250d9Smckusick } Pfk_table; 323b6250d9Smckusick 333b6250d9Smckusick typedef struct pfk_string { 343b6250d9Smckusick int pfk_num; 353b6250d9Smckusick int pfk_shift; 363b6250d9Smckusick Key_string pfk_string; 373b6250d9Smckusick } Pfk_string; 383b6250d9Smckusick 393b6250d9Smckusick #define KBDPRI 28 403b6250d9Smckusick 413b6250d9Smckusick #define KIOCSETS 0 /* set pfk string */ 423b6250d9Smckusick #define KIOCBELL 1 /* ring bell */ 433b6250d9Smckusick #define KIOCBACK 2 /* push back string */ 443b6250d9Smckusick #define KIOCREPT 3 /* auto repeat on */ 453b6250d9Smckusick #define KIOCNRPT 4 /* auto repeat off */ 463b6250d9Smckusick #define KIOCGETS 5 /* get pfk string */ 473b6250d9Smckusick #define KIOCRAW 6 /* get raw key data */ 483b6250d9Smckusick #define KIOCSETE 7 493b6250d9Smckusick #define KIOCFLUSH 8 503b6250d9Smckusick #define KIOCNREAD FIONREAD /* return input char's */ 513b6250d9Smckusick #define KIOCSETLOCK 10 /* set lock type */ 523b6250d9Smckusick #define KIOCSETTBL 11 /* set key_table */ 533b6250d9Smckusick #define KIOCGETCNUM 12 /* get country number */ 543b6250d9Smckusick #define KIOCSETCNUM 13 /* set country number */ 553b6250d9Smckusick #define KIOCDEFTBL 14 /* default key_table */ 563b6250d9Smckusick #define KIOCCHTBL 15 /* change key_table */ 573b6250d9Smckusick #define KIOCOYATBL 16 /* oya_key_table */ 583b6250d9Smckusick #define KIOCGETSTAT 17 /* get keyboard status */ 593b6250d9Smckusick #define KIOCSETSTAT 18 /* set keyboard status */ 603b6250d9Smckusick 613b6250d9Smckusick #define OFF 0x80 623b6250d9Smckusick 633b6250d9Smckusick extern int N_Pfk; 643b6250d9Smckusick #define N_PFK N_Pfk 653b6250d9Smckusick 663b6250d9Smckusick #define N_KEY 93 673b6250d9Smckusick 683b6250d9Smckusick /* 693b6250d9Smckusick * Programmable function key 703b6250d9Smckusick */ 713b6250d9Smckusick #define F1 1 723b6250d9Smckusick #define F2 2 733b6250d9Smckusick #define F3 3 743b6250d9Smckusick #define F4 4 753b6250d9Smckusick #define F5 5 763b6250d9Smckusick #define F6 6 773b6250d9Smckusick #define F7 7 783b6250d9Smckusick #define F8 8 793b6250d9Smckusick #define F9 9 803b6250d9Smckusick #define F10 10 813b6250d9Smckusick 823b6250d9Smckusick #define PF1 11 833b6250d9Smckusick #define PF2 12 843b6250d9Smckusick #define PF3 13 853b6250d9Smckusick #define PF4 14 863b6250d9Smckusick #define PF5 15 873b6250d9Smckusick #define PF6 16 883b6250d9Smckusick #define PF7 17 893b6250d9Smckusick #define PF8 18 903b6250d9Smckusick #define PF9 19 913b6250d9Smckusick #define PF10 20 923b6250d9Smckusick #define PF11 21 933b6250d9Smckusick #define PF12 22 943b6250d9Smckusick 953b6250d9Smckusick #define NCNV 23 963b6250d9Smckusick #define CONV 24 973b6250d9Smckusick #define ENTER 25 983b6250d9Smckusick 993b6250d9Smckusick #define N0 26 1003b6250d9Smckusick #define N1 27 1013b6250d9Smckusick #define N2 28 1023b6250d9Smckusick #define N3 29 1033b6250d9Smckusick #define N4 30 1043b6250d9Smckusick #define N5 31 1053b6250d9Smckusick #define N6 32 1063b6250d9Smckusick #define N7 33 1073b6250d9Smckusick #define N8 34 1083b6250d9Smckusick #define N9 35 1093b6250d9Smckusick 1103b6250d9Smckusick #define PERIOD 36 1113b6250d9Smckusick #define MINUS 37 1123b6250d9Smckusick #define PLUS 38 1133b6250d9Smckusick #define COMMA 39 1143b6250d9Smckusick #define NENTER 40 1153b6250d9Smckusick #define UP 41 1163b6250d9Smckusick #define DOWN 42 1173b6250d9Smckusick #define RIGHT 43 1183b6250d9Smckusick #define LEFT 44 1193b6250d9Smckusick 1203b6250d9Smckusick #endif /* !__KEYBOARD__ */ 121