KeyHandlerInput // + Conditioning for Esc key.
This commit is contained in:
parent
a72f1a45f2
commit
9b3e5fcf4d
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue