keycode 0.2.1 → 0.2.2
raw patch · 3 files changed
+11/−2 lines, 3 filesdep ~template-haskellPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: template-haskell
API changes (from Hackage documentation)
+ Web.KeyCode: isKeyCode :: Key -> KeyCode -> Bool
Files
- CHANGELOG.md +3/−0
- keycode.cabal +1/−1
- src/Web/KeyCode.hs +7/−1
CHANGELOG.md view
@@ -1,3 +1,6 @@+### 0.2.2+* Add `isKeyCode` function [ryantrinkle]+ ### 0.2.1 * Bugfix: the keycodes for `-` and `=` were swapped on Gecko-based browsers (e.g., Firefox)
keycode.cabal view
@@ -1,5 +1,5 @@ name: keycode-version: 0.2.1+version: 0.2.2 synopsis: Maps web browser keycodes to their corresponding keyboard keys description: Keyboard events in web browsers are often represented as keycodes, which (1) are difficult to remember, and (2) sometimes vary from
src/Web/KeyCode.hs view
@@ -27,7 +27,7 @@ /Since: 0.1/ -}-module Web.KeyCode (Key(..), KeyCode, keyCodeLookup, keyCodeMap) where+module Web.KeyCode (Key(..), KeyCode, keyCodeLookup, keyCodeMap, isKeyCode) where import Data.IntMap (IntMap, findWithDefault, fromAscList) import Data.Ix (Ix)@@ -302,3 +302,9 @@ , (224, Command ) , (225, Alt ) ]++-- | Return 'True' if the given 'KeyCode' matches the given 'Key'.+--+-- /Since: 0.2.2/+isKeyCode :: Key -> KeyCode -> Bool+isKeyCode key code = key == keyCodeLookup code