--- a/TerminalView.st Tue Apr 23 20:06:49 2019 +0200
+++ b/TerminalView.st Sat Apr 27 09:50:57 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1998 by eXept Software AG
All Rights Reserved
@@ -1060,44 +1058,45 @@
self send:(seq withoutCEscapes).
^ self
].
-
- (rawKey startsWith:'Ctrl') ifTrue:[
- rest := rawKey copyFrom:5.
- rest size == 1 ifTrue:[
- rest := rest at:1.
- (rest asLowercase between:$a and:$z) ifTrue:[
- DebugKeyboard ifTrue:[
- Transcript show:'ctrl ->' ; showCR:(Character controlCharacter:rest) storeString.
+ rawKey notNil ifTrue:[
+ (rawKey startsWith:'Ctrl') ifTrue:[
+ rest := rawKey copyFrom:5.
+ rest size == 1 ifTrue:[
+ rest := rest at:1.
+ (rest asLowercase between:$a and:$z) ifTrue:[
+ DebugKeyboard ifTrue:[
+ Transcript show:'ctrl ->' ; showCR:(Character controlCharacter:rest) storeString.
+ ].
+ (signalControlKeys and:[rawKey == #Ctrlc]) ifTrue:[
+ self doSendInterrupt.
+ ^ self.
+ ].
+ self sendCharacter:(Character controlCharacter:rest).
+ ^ self
].
- (signalControlKeys and:[rawKey == #Ctrlc]) ifTrue:[
- self doSendInterrupt.
- ^ self.
- ].
- self sendCharacter:(Character controlCharacter:rest).
- ^ self
+ ]
+ ].
+
+ ((rawKey startsWith:'Control')
+ or:[ (rawKey startsWith:'Shift')
+ or:[ (rawKey startsWith:'Alt')
+ or:[ (rawKey = 'Ctrl')
+ ]]]) ifTrue:[
+ DebugKeyboard ifTrue:[
+ Transcript showCR:'modifier ignored'.
].
- ]
+ ^ self
+ ].
+ (rawKey startsWith:'Cmd') ifTrue:[
+ DebugKeyboard ifTrue:[
+ Transcript showCR:'CMD handled internal'.
+ ].
+ ^ super keyPress:aKey x:x y:y
+ ].
].
-
- ((rawKey startsWith:'Control')
- or:[ (rawKey startsWith:'Shift')
- or:[ (rawKey startsWith:'Alt')
- or:[ (rawKey = 'Ctrl')
- ]]]) ifTrue:[
- DebugKeyboard ifTrue:[
- Transcript showCR:'modifier ignored'.
- ].
- ^ self
- ].
- (rawKey startsWith:'Cmd') ifTrue:[
- DebugKeyboard ifTrue:[
- Transcript showCR:'CMD handled internal'.
- ].
- ^ super keyPress:aKey x:x y:y
- ].
-
+
DebugKeyboard ifTrue:[
- Transcript show:'unhandled: '; showCR:rawKey.
+ Transcript showCR:'unhandled: %1' with:(rawKey ? aKey).
].
"
@@ -1105,7 +1104,7 @@
"
"Modified: / 25-01-2012 / 10:43:06 / cg"
- "Modified: / 09-08-2018 / 10:32:07 / Claus Gittinger"
+ "Modified: / 26-04-2019 / 09:55:40 / Claus Gittinger"
!
keyPressInLineEditMode:aKey