Skip to content

Commit 2a3f55f

Browse files
committed
Added keyError enumerated type for detecting key timeouts
1 parent 0190cd3 commit 2a3f55f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sources/Key.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public struct Key {
4141

4242
private static let enter = KEY_ENTER
4343

44+
private static let keyError = ERR
45+
4446
public enum KeyType {
4547
// key type
4648
case isUnknown
@@ -69,6 +71,8 @@ public struct Key {
6971
case function12
7072

7173
case enter
74+
75+
case keyError
7276
}
7377

7478
let specialKeyMap = [
@@ -92,7 +96,9 @@ public struct Key {
9296
F11 : KeyType.function11,
9397
F12 : KeyType.function12,
9498

95-
enter : KeyType.enter
99+
enter : KeyType.enter,
100+
101+
keyError : KeyType.keyError
96102
]
97103

98104
// Code and key type are always set

0 commit comments

Comments
 (0)