From: Taylor R. Campbell Date: Sat, 21 Oct 2006 21:16:53 +0000 (+0000) Subject: Strip the bucky bit for control from key input events only if the X-Git-Tag: 20090517-FFI~885 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c0658749687efe661b4f11163c1d2b9012dddd70;p=mit-scheme.git Strip the bucky bit for control from key input events only if the character is already a control character. Otherwise leave it in, so that other characters can be control-modified without using the clumsier C-z or C-^ prefix key bindings. --- diff --git a/v7/src/edwin/xterm.scm b/v7/src/edwin/xterm.scm index 94d2f5d43..a6c29f4bd 100644 --- a/v7/src/edwin/xterm.scm +++ b/v7/src/edwin/xterm.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xterm.scm,v 1.75 2006/02/15 05:10:00 cph Exp $ +$Id: xterm.scm,v 1.76 2006/10/21 21:16:53 riastradh Exp $ Copyright 1989,1990,1991,1992,1993,1995 Massachusetts Institute of Technology Copyright 1996,1998,1999,2000,2001,2002 Massachusetts Institute of Technology @@ -412,11 +412,14 @@ USA. (vector-ref event 3))) ((fix:= end 1) (let ((char - (if (or (fix:= (vector-ref event 3) 0) - (fix:= (vector-ref event 3) 2)) - (string-ref string 0) - (make-char (char-code (string-ref string 0)) - (fix:andc (vector-ref event 3) 2))))) + (let ((code (char-code (string-ref string 0))) + (bucky-bits (vector-ref event 3))) + (make-char code + ;; Remove the control bit if this + ;; already is a control character. + (if (fix:< code #x20) + (fix:andc bucky-bits 2) + bucky-bits))))) (if (and signal-interrupts? (char=? char #\BEL)) (begin (signal-interrupt!)