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:
parent
c09be724d6
commit
99ec86e438
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user