From 99ec86e438b944ede18da7a04afbafb438ffdd2e Mon Sep 17 00:00:00 2001 From: Kazutaka YOKOTA Date: Mon, 14 Jul 1997 03:36:50 +0000 Subject: scgetc() referred to `spcl' in different ways when a key is pressed and released. It should use `spcl' consistently in both cases, otherwise shift/control/alt state may not be correctly set/reset. (Even with this fix, you can still make syscons confused and fail to change internal state if you really want to, by installing a really arcane and artificial keymap.) PR: i386/4030 Reviewed by: sos --- sys/dev/syscons/syscons.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/syscons') diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 7b5cafb61f631..71dc2b0916a05 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -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.222 1997/07/08 13:38:58 brian Exp $ + * $Id: syscons.c,v 1.223 1997/07/09 14:10:19 brian Exp $ */ #include "sc.h" @@ -3043,7 +3043,7 @@ next_code: /* Check for make/break */ action = key->map[state]; if (scancode & 0x80) { /* key released */ - if (key->spcl & 0x80) { + if (key->spcl & (0x80>>state)) { switch (action) { case LSH: shfts &= ~1; -- cgit v1.3