KeyHandlerInput // + Conditioning for Esc key.

This commit is contained in:
ShikiSuen 2022-02-23 14:24:35 +08:00
parent a72f1a45f2
commit 9b3e5fcf4d
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import Cocoa
// KeyCodes: https://eastmanreference.com/complete-list-of-applescript-key-codes
enum KeyCode: UInt16 {
case none = 0
case esc = 53
case tab = 48
case enter = 76
case up = 126
@ -185,7 +186,7 @@ class KeyHandlerInput: NSObject {
}
@objc var isESC: Bool {
CharCode(rawValue: charCode) == CharCode.esc
(CharCode(rawValue: charCode) == CharCode.esc) || (KeyCode(rawValue: keyCode) == KeyCode.esc)
}
@objc var isHome: Bool {