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
This commit is contained in:
Kazutaka YOKOTA 1997-07-14 03:36:50 +00:00
parent c09be724d6
commit 99ec86e438
3 changed files with 6 additions and 6 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.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 @@ scgetc(u_int flags)
/* 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;

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.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 @@ scgetc(u_int flags)
/* 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;

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.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 @@ scgetc(u_int flags)
/* 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;