1 /* $NetBSD: kbd.h,v 1.3 2015/09/07 03:49:45 dholland Exp $ */ 2 3 /* 4 * Copyright (c) 1995 Mark Brinicombe. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed by Mark Brinicombe. 17 * 4. The name of the company nor the name of the author may be used to 18 * endorse or promote products derived from this software without specific 19 * prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * RiscBSD kernel project 34 * 35 * kbd.h 36 * 37 * Keyboard ioctls 38 * 39 * Created : 21/07/95 40 */ 41 42 #include <sys/ioccom.h> 43 44 struct kbd_data { 45 int keycode; 46 struct timeval event_time; 47 }; 48 49 struct kbd_autorepeat { 50 int ka_delay; 51 int ka_rate; 52 }; 53 54 #define KBD_GETAUTOREPEAT _IOR( 'k', 100, struct kbd_autorepeat) 55 #define KBD_SETAUTOREPEAT _IOW( 'k', 101, struct kbd_autorepeat) 56 #define KBD_SETLEDS _IOW( 'k', 102, int) 57 #define KBD_XXX _IOW( 'k', 103, int) 58 59 #define KBD_LED_SCROLL_LOCK 0x01 60 #define KBD_LED_NUM_LOCK 0x02 61 #define KBD_LED_CAPS_LOCK 0x04 62 63 #ifdef _KERNEL 64 void kbdsetstate(int /*state*/); 65 int kbdgetstate(void); 66 #endif 67 68 /* End of kbd.h */ 69