Skip to content

Commit

Permalink
Add ISO section key (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
irth authored Dec 29, 2024
1 parent 4d02d80 commit 9588de6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/HotKey/Key.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public enum Key {
case grave // Backtick
case leftBracket
case minus
case section

// MARK: - Whitespace

Expand Down Expand Up @@ -260,6 +261,7 @@ public enum Key {
case "rightarrow", "": self = .rightArrow
case "downarrow", "": self = .downArrow
case "uparrow", "": self = .upArrow
case "section", "§": self = .section
default: return nil
}
}
Expand Down Expand Up @@ -379,6 +381,7 @@ public enum Key {
case UInt32(kVK_RightArrow): self = .rightArrow
case UInt32(kVK_DownArrow): self = .downArrow
case UInt32(kVK_UpArrow): self = .upArrow
case UInt32(kVK_ISO_Section): self = .section
default: return nil
}
}
Expand Down Expand Up @@ -498,6 +501,7 @@ public enum Key {
case .rightArrow: return UInt32(kVK_RightArrow)
case .downArrow: return UInt32(kVK_DownArrow)
case .upArrow: return UInt32(kVK_UpArrow)
case .section: return UInt32(kVK_ISO_Section)
}
}
}
Expand Down Expand Up @@ -604,6 +608,7 @@ extension Key: CustomStringConvertible {
case .rightArrow: return ""
case .downArrow: return ""
case .upArrow: return ""
case .section: return "§"
}
}
}
Expand Down

0 comments on commit 9588de6

Please sign in to comment.