Skip to content
Permalink
Browse files

do an image patch for Windows VM inconsitency with other platforms. T…

…his OS returns keyCharacters as uppercase
  • Loading branch information
pavel-krivanek committed Jan 1, 2019
1 parent 6de2c92 commit e9c57ad788d300c8e93f5211b2f49f62017f81e6
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/Morphic-Core/KeyboardEvent.class.st
@@ -107,11 +107,14 @@ KeyboardEvent >> keyValue [

{ #category : #keymapping }
KeyboardEvent >> modifiedCharacter [
self flag: #hack.
"Hack me. When Ctrl is pressed, the key ascii value is not right and we have to do something ugly"
^(self hasSpecialCTRLKeyValue and: [ (#(MacOSX Windows) includes: Smalltalk os current platformFamily) ])
ifTrue: [ (self keyValue + $a asciiValue - 1) asCharacter ]
ifFalse: [ self keyCharacter ]
self flag: #hack.
"Hack me. When Ctrl is pressed, the key ascii value is not right and we have to do something ugly"
^(self hasSpecialCTRLKeyValue and: [ (#(MacOSX Windows) includes: Smalltalk os current platformFamily) ])
ifTrue: [ (self keyValue + $a asciiValue - 1) asCharacter ]
ifFalse: [
Smalltalk os isWindows
ifTrue: [ self keyCharacter asLowercase ]
ifFalse: [ self keyCharacter ] ]
]

{ #category : #printing }

0 comments on commit e9c57ad

Please sign in to comment.
You can’t perform that action at this time.