diff --git a/sources/LLKEY b/sources/LLKEY
index acf83bbe..ba6db89e 100644
--- a/sources/LLKEY
+++ b/sources/LLKEY
@@ -1,6 +1,6 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED " 3-Jan-2024 12:32:52" {MEDLEY}<SOURCES>LLKEY.;4 199606 
+(FILECREATED " 3-Jan-2024 16:10:17" {MEDLEY}<SOURCES>LLKEY.;4 199503 
 
       :EDIT-BY "mth"
 
@@ -8,7 +8,7 @@
                   (VARS LLKEYCOMS)
                   (RECORDS KEYBOARDEVENT)
 
-      :PREVIOUS-DATE "27-Aug-2021 16:18:18" {MEDLEY}<SOURCES>LLKEY.;1)
+      :PREVIOUS-DATE " 3-Jan-2024 12:32:52" {MEDLEY}<SOURCES>LLKEY.;3)
 
 
 (PRETTYCOMPRINT LLKEYCOMS)
@@ -854,7 +854,7 @@
     T])
 
 (\DECODETRANSITION
-  [LAMBDA (KEYNUMBER DOWNFLG)                                (* ; "Edited  3-Jan-2024 12:31 by mth")
+  [LAMBDA (KEYNUMBER DOWNFLG)                                (* ; "Edited  3-Jan-2024 16:04 by mth")
                                                              (* ; "Edited 19-Nov-87 16:29 by Snow")
 
     (* ;; "KEYNUMBER is the key number in the hardware keyboard layout, DOWNFLG is T if the key just went down.  PENDINGINTERRUPT, bound in \KEYHANDLER, is set to the decoded character if it is an interrupt.")
@@ -868,17 +868,15 @@
               (LOCKSHIFT.TF 
                             (* ;; "Take shift action if either Shift or Caps Lock is down. ")
 
-                            (* ;; "If SHIFTXORLOCKFLG then, but not both!")
+                            (* ;; "If SHIFTXORLOCKFLG, but not both!")
 
-                            (IF (OR (AND SHIFTXORLOCKFLG (fetch (KEYBOARDEVENT SHIFTXORLOCK)
-                                                            of KEYSTATE))
-                                    (fetch (KEYBOARDEVENT SHIFTORLOCK) of KEYSTATE))
-                                THEN (SETQ SHIFTED T)))
+                            (IF SHIFTXORLOCKFLG
+                                THEN (SETQ SHIFTED (fetch (KEYBOARDEVENT SHIFTXORLOCK) of KEYSTATE))
+                              ELSE (SETQ SHIFTED (fetch (KEYBOARDEVENT SHIFTORLOCK) of KEYSTATE))))
               (NOLOCKSHIFT.TF 
                               (* ;; "Take shift action only when Shift is down")
 
-                   (IF (fetch (KEYBOARDEVENT SHIFT) of KEYSTATE)
-                       THEN (SETQ SHIFTED T)))
+                   (SETQ SHIFTED (fetch (KEYBOARDEVENT SHIFT) of KEYSTATE)))
               (EVENT.TF (RETURN))
               (1SHIFTUP.TF (replace (KEYBOARDEVENT 1SHIFT) of KEYSTATE with NIL)
                            (RETURN))
@@ -3925,31 +3923,31 @@
 (DECLARE%: DONTCOPY
   (FILEMAP (NIL (14744 22060 (BKSYSCHARCODE 14754 . 15103) (\CLEARSYSBUF 15105 . 15663) (\GETKEY 15665
  . 16840) (\NSYSBUFCHARS 16842 . 17584) (\SAVESYSBUF 17586 . 19195) (\SYSBUFP 19197 . 19501) (
-\GETSYSBUF 19503 . 19683) (\PUTSYSBUF 19685 . 20898) (\PEEKSYSBUF 20900 . 22058)) (23345 60866 (
+\GETSYSBUF 19503 . 19683) (\PUTSYSBUF 19685 . 20898) (\PEEKSYSBUF 20900 . 22058)) (23345 60763 (
 \KEYBOARDINIT 23355 . 25075) (\KEYBOARDEVENTFN 25077 . 29777) (\ALLOCLOCKED 29779 . 30369) (
 \SETIOPOINTERS 30371 . 34907) (\KEYBOARDOFF 34909 . 35323) (\KEYBOARDON 35325 . 35704) (\KEYHANDLER 
 35706 . 35837) (\KEYHANDLER1 35839 . 43285) (\RESETKEYBOARD 43287 . 44935) (\DOMOUSECHORDING 44937 . 
-48757) (\DOTRANSITIONS 48759 . 49436) (\DECODETRANSITION 49438 . 56814) (MOUSECHORDWAIT 56816 . 57480)
- (\TRACKCURSOR 57482 . 60864)) (95325 117198 (KEYACTION 95335 . 96188) (KEYACTIONTABLE 96190 . 97372) 
-(KEYBOARDTYPE 97374 . 98476) (RESETKEYACTION 98478 . 100237) (\KEYBOARD.MACHINE-SPECIFIC-KEYACTIONS 
-100239 . 102141) (\KEYACTION1 102143 . 112259) (KEYDOWNP 112261 . 112596) (KEYNUMBERP 112598 . 112796)
- (\KEYNAMETONUMBER 112798 . 113492) (\KEYNUMBERTONAME 113494 . 113684) (MODIFY.KEYACTIONS 113686 . 
-114547) (METASHIFT 114549 . 115493) (SHIFTDOWNP 115495 . 117196)) (117261 117557 (
-SETUP.OFFICE.KEYBOARD 117271 . 117555)) (120536 122248 (\INIT.KEYBOARD.STREAM 120546 . 122246)) (
-122513 138890 (\DOBUFFEREDTRANSITIONS 122523 . 137953) (\TIMER.INTERRUPTFRAME 137955 . 138680) (
-\PERIODIC.INTERRUPTFRAME 138682 . 138888)) (139144 143221 (\HARDCURSORUP 139154 . 141036) (
-\HARDCURSORPOSITION 141038 . 143074) (\HARDCURSORDOWN 143076 . 143219)) (143222 167282 (CURSOR.INIT 
-143232 . 146932) (\CURSORDESTINATION 146934 . 149252) (\SOFTCURSORUP 149254 . 154508) (
-\SOFTCURSORUPCURRENT 154510 . 161546) (\SOFTCURSORPOSITION 161548 . 162313) (\SOFTCURSORDOWN 162315 . 
-163023) (CURSORPROP 163025 . 163367) (GETCURSORPROP 163369 . 163557) (PUTCURSORPROP 163559 . 164714) (
-\CURSORBITSPERPIXEL 164716 . 166832) (\CURSORIMAGEPROPNAME 166834 . 167058) (\CURSORMASKPROPNAME 
-167060 . 167280)) (167283 185233 (CURSORCREATE 167293 . 169968) (CURSOR 169970 . 171782) (
-\CURSOR-VALID-P 171784 . 172871) (\CURSORUP 172873 . 174588) (\CURSORPOSITION 174590 . 177118) (
-\CURSORDOWN 177120 . 177353) (ADJUSTCURSORPOSITION 177355 . 177933) (CURSORPOSITION 177935 . 179477) (
-CURSORSCREEN 179479 . 180135) (CURSOREXIT 180137 . 181528) (FLIPCURSOR 181530 . 182656) (FLIPCURSORBAR
- 182658 . 183638) (LASTMOUSEX 183640 . 183894) (LASTMOUSEY 183896 . 184150) (CREATEPOSITION 184152 . 
-184358) (POSITIONP 184360 . 184644) (CURSORHOTSPOT 184646 . 185231)) (186471 188019 (GETMOUSESTATE 
-186481 . 187140) (\EVENTKEYS 187142 . 188017)) (194218 195014 (MACHINETYPE 194228 . 194628) (
-SETMAINTPANEL 194630 . 195012)) (195044 196183 (BEEPON 195054 . 195707) (BEEPOFF 195709 . 196181)) (
-196634 196897 (WITHOUT-INTERRUPTS 196644 . 196895)))))
+48757) (\DOTRANSITIONS 48759 . 49436) (\DECODETRANSITION 49438 . 56711) (MOUSECHORDWAIT 56713 . 57377)
+ (\TRACKCURSOR 57379 . 60761)) (95222 117095 (KEYACTION 95232 . 96085) (KEYACTIONTABLE 96087 . 97269) 
+(KEYBOARDTYPE 97271 . 98373) (RESETKEYACTION 98375 . 100134) (\KEYBOARD.MACHINE-SPECIFIC-KEYACTIONS 
+100136 . 102038) (\KEYACTION1 102040 . 112156) (KEYDOWNP 112158 . 112493) (KEYNUMBERP 112495 . 112693)
+ (\KEYNAMETONUMBER 112695 . 113389) (\KEYNUMBERTONAME 113391 . 113581) (MODIFY.KEYACTIONS 113583 . 
+114444) (METASHIFT 114446 . 115390) (SHIFTDOWNP 115392 . 117093)) (117158 117454 (
+SETUP.OFFICE.KEYBOARD 117168 . 117452)) (120433 122145 (\INIT.KEYBOARD.STREAM 120443 . 122143)) (
+122410 138787 (\DOBUFFEREDTRANSITIONS 122420 . 137850) (\TIMER.INTERRUPTFRAME 137852 . 138577) (
+\PERIODIC.INTERRUPTFRAME 138579 . 138785)) (139041 143118 (\HARDCURSORUP 139051 . 140933) (
+\HARDCURSORPOSITION 140935 . 142971) (\HARDCURSORDOWN 142973 . 143116)) (143119 167179 (CURSOR.INIT 
+143129 . 146829) (\CURSORDESTINATION 146831 . 149149) (\SOFTCURSORUP 149151 . 154405) (
+\SOFTCURSORUPCURRENT 154407 . 161443) (\SOFTCURSORPOSITION 161445 . 162210) (\SOFTCURSORDOWN 162212 . 
+162920) (CURSORPROP 162922 . 163264) (GETCURSORPROP 163266 . 163454) (PUTCURSORPROP 163456 . 164611) (
+\CURSORBITSPERPIXEL 164613 . 166729) (\CURSORIMAGEPROPNAME 166731 . 166955) (\CURSORMASKPROPNAME 
+166957 . 167177)) (167180 185130 (CURSORCREATE 167190 . 169865) (CURSOR 169867 . 171679) (
+\CURSOR-VALID-P 171681 . 172768) (\CURSORUP 172770 . 174485) (\CURSORPOSITION 174487 . 177015) (
+\CURSORDOWN 177017 . 177250) (ADJUSTCURSORPOSITION 177252 . 177830) (CURSORPOSITION 177832 . 179374) (
+CURSORSCREEN 179376 . 180032) (CURSOREXIT 180034 . 181425) (FLIPCURSOR 181427 . 182553) (FLIPCURSORBAR
+ 182555 . 183535) (LASTMOUSEX 183537 . 183791) (LASTMOUSEY 183793 . 184047) (CREATEPOSITION 184049 . 
+184255) (POSITIONP 184257 . 184541) (CURSORHOTSPOT 184543 . 185128)) (186368 187916 (GETMOUSESTATE 
+186378 . 187037) (\EVENTKEYS 187039 . 187914)) (194115 194911 (MACHINETYPE 194125 . 194525) (
+SETMAINTPANEL 194527 . 194909)) (194941 196080 (BEEPON 194951 . 195604) (BEEPOFF 195606 . 196078)) (
+196531 196794 (WITHOUT-INTERRUPTS 196541 . 196792)))))
 STOP
diff --git a/sources/LLKEY.LCOM b/sources/LLKEY.LCOM
index 6c9999ef..de59ebc4 100644
Binary files a/sources/LLKEY.LCOM and b/sources/LLKEY.LCOM differ
