diff options
author | joerg <joerg@FreeBSD.org> | 1995-03-05 22:26:21 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1995-03-05 22:26:21 +0000 |
commit | b63a99a993766587dcd0041f058aad5d074c8d72 (patch) | |
tree | d900fc374e22bad41bb43ddc69e790c29562fdf5 /sys/i386/isa/pcvt/pcvt_kbd.c | |
parent | 631a7b3f84cd4ed43f5c35e9565e9cf3babbe10b (diff) | |
download | FreeBSD-src-b63a99a993766587dcd0041f058aad5d074c8d72.zip FreeBSD-src-b63a99a993766587dcd0041f058aad5d074c8d72.tar.gz |
Update to beta3.20/b22
pcvt_ioctl.h doesn't belong to here.
Diffstat (limited to 'sys/i386/isa/pcvt/pcvt_kbd.c')
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_kbd.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_kbd.c b/sys/i386/isa/pcvt/pcvt_kbd.c index 2aff93b..49c8d1c 100644 --- a/sys/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/i386/isa/pcvt/pcvt_kbd.c @@ -38,7 +38,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * - * @(#)pcvt_kbd.c, 3.20, Last Edit-Date: [Thu Jan 26 14:12:21 1995] + * @(#)pcvt_kbd.c, 3.20, Last Edit-Date: [Sun Feb 26 13:28:00 1995] * */ @@ -60,6 +60,7 @@ * -hm PR #399, patch from Bill Sommerfeld: Return with PCVT_META_ESC * -hm allow keyboard-less kernel boot for serial consoles and such .. * -hm patch from Lon Willett for led-update and showkey() + * -hm patch from Lon Willett to fix mapping of Control-R scancode * *---------------------------------------------------------------------------*/ @@ -104,7 +105,7 @@ u_char rawkeybuf[80]; #if PCVT_SHOWKEYS /*---------------------------------------------------------------------------* - * keyboard debugging: put kbd communication into a display buffer + * keyboard debugging: put kbd communication char into some buffer *---------------------------------------------------------------------------*/ static void showkey (char delim, u_char val) { @@ -136,19 +137,18 @@ static void showkey (char delim, u_char val) #endif /* PCVT_SHOWKEYS */ /*---------------------------------------------------------------------------* - * function bound to control function key 12 + * function to switch to another virtual screen *---------------------------------------------------------------------------*/ static void do_vgapage(int page) { - if(critical_scroll) - switch_page = page; + if(critical_scroll) /* executing critical region ? */ + switch_page = page; /* yes, auto switch later */ else - vgapage(page); + vgapage(page); /* no, switch now */ } - /* * This code from Lon Willett enclosed in #if PCVT_UPDLED_LOSES_INTR is * abled because it crashes FreeBSD 1.1.5.1 at boot time. @@ -208,13 +208,15 @@ update_led(void) #if !PCVT_NO_LED_UPDATE /* Don't update LED's unless necessary. */ + int new_ledstate = ((vsp->scroll_lock) | (vsp->num_lock * 2) | (vsp->caps_lock * 4)); - if (new_ledstate != ledstate) { - - if(kbd_cmd(KEYB_C_LEDS) != 0) { + if (new_ledstate != ledstate) + { + if(kbd_cmd(KEYB_C_LEDS) != 0) + { printf("Keyboard LED command timeout\n"); return; } @@ -229,6 +231,7 @@ update_led(void) #if PCVT_UPDLED_LOSES_INTR if (lost_intr_timeout_queued) untimeout (check_for_lost_intr, (void *)NULL); + timeout (check_for_lost_intr, (void *)NULL, hz); lost_intr_timeout_queued = 1; #endif /* PCVT_UPDLED_LOSES_INTR */ @@ -238,7 +241,7 @@ update_led(void) } /*---------------------------------------------------------------------------* - * set typamatic rate + * set typematic rate *---------------------------------------------------------------------------*/ static void settpmrate(int rate) @@ -506,7 +509,7 @@ kbd_code_init(void) /*---------------------------------------------------------------------------* * init keyboard code, this initializes the keyboard subsystem * just "a bit" so the very very first ddb session is able to - * get proper keystrokes, in other words, it's a hack .... + * get proper keystrokes - in other words, it's a hack .... *---------------------------------------------------------------------------*/ void kbd_code_init1(void) @@ -1321,9 +1324,11 @@ regular: key = 0; else key = kbd_status.extended ? extscantokey[dt] : scantokey[dt]; - if(kbd_status.ext1 && key == 58) + + if(kbd_status.ext1 && key == 64) /* virtual control key */ key = 129; + kbd_status.extended = kbd_status.ext1 = 0; #if PCVT_CTRL_ALT_DEL /* Check for cntl-alt-del */ @@ -1494,8 +1499,10 @@ regular: kbd_lastkey = key; cp = xlatkey2ascii(key); /* have a key */ + if(cp == NULL && !noblock) goto loop; + return cp; } |