Synchronize with sys/i386/isa/syscons.c and syscons.h revisions 1.234

and 1.34, respectively.
This commit is contained in:
KATO Takenori 1997-10-02 09:14:33 +00:00
parent 4281faf253
commit bde734639c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30055
2 changed files with 25 additions and 13 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.57 1997/09/27 12:55:57 kato Exp $
* $Id: syscons.c,v 1.58 1997/09/28 05:51:49 kato Exp $
*/
#include "sc.h"
@ -1620,13 +1620,19 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
case KDSKBMODE: /* set keyboard mode */
switch (*data) {
case K_RAW: /* switch to RAW scancode mode */
scp->status &= ~KBD_CODE_MODE;
scp->status |= KBD_RAW_MODE;
return 0;
case K_CODE: /* switch to CODE mode */
scp->status &= ~KBD_RAW_MODE;
scp->status |= KBD_CODE_MODE;
return 0;
case K_XLATE: /* switch to XLT ascii mode */
if (scp == cur_console && scp->status & KBD_RAW_MODE)
shfts = ctls = alts = agrs = metas = 0;
scp->status &= ~KBD_RAW_MODE;
scp->status &= ~(KBD_RAW_MODE | KBD_CODE_MODE);
return 0;
default:
return EINVAL;
@ -1634,7 +1640,8 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
/* NOT REACHED */
case KDGKBMODE: /* get keyboard mode */
*data = (scp->status & KBD_RAW_MODE) ? K_RAW : K_XLATE;
*data = (scp->status & KBD_RAW_MODE) ? K_RAW :
((scp->status & KBD_CODE_MODE) ? K_CODE : K_XLATE);
return 0;
case KDMKTONE: /* sound the bell */
@ -2261,7 +2268,8 @@ exchange_scr(void)
if ((old_scp->status & UNKNOWN_MODE) && crtc_vga)
load_palette(palette);
#endif
if (old_scp->status & KBD_RAW_MODE || new_scp->status & KBD_RAW_MODE)
if (old_scp->status & KBD_RAW_MODE || new_scp->status & KBD_RAW_MODE ||
old_scp->status & KBD_CODE_MODE || new_scp->status & KBD_CODE_MODE)
shfts = ctls = alts = agrs = metas = 0;
update_leds(new_scp->status);
delayed_next_scr = FALSE;
@ -3856,6 +3864,9 @@ next_code:
break;
}
if (cur_console->status & KBD_CODE_MODE)
return (keycode | (scancode & 0x80));
/* if scroll-lock pressed allow history browsing */
if (cur_console->history && cur_console->status & SLKED) {
int i;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.h,v 1.16 1997/08/26 15:09:36 kato Exp $
* $Id: syscons.h,v 1.17 1997/09/05 10:17:30 kato Exp $
*/
#ifndef _PC98_PC98_SYSCONS_H_
@ -56,14 +56,15 @@
#define LED_MASK 0x00007
#define UNKNOWN_MODE 0x00010
#define KBD_RAW_MODE 0x00020
#define SWITCH_WAIT_REL 0x00040
#define SWITCH_WAIT_ACQ 0x00080
#define BUFFER_SAVED 0x00100
#define CURSOR_ENABLED 0x00200
#define MOUSE_ENABLED 0x00400
#define MOUSE_MOVED 0x00800
#define MOUSE_CUTTING 0x01000
#define MOUSE_VISIBLE 0x02000
#define KBD_CODE_MODE 0x00040
#define SWITCH_WAIT_REL 0x00080
#define SWITCH_WAIT_ACQ 0x00100
#define BUFFER_SAVED 0x00200
#define CURSOR_ENABLED 0x00400
#define MOUSE_ENABLED 0x00800
#define MOUSE_MOVED 0x01000
#define MOUSE_CUTTING 0x02000
#define MOUSE_VISIBLE 0x04000
/* configuration flags */
#define VISUAL_BELL 0x00001