Copyright | (C) 2016-2025 David M. Johnson |
---|---|
License | BSD3-style (see the file LICENSE) |
Maintainer | David M. Johnson <code@dmj.io> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Miso.Subscription.Keyboard
Contents
Description
Types
type for arrow keys currently pressed
- 37 left arrow ( x = -1 )
- 38 up arrow ( y = 1 )
- 39 right arrow ( x = 1 )
- 40 down arrow ( y = -1 )
Instances
Subscriptions
directionSub :: ([Int], [Int], [Int], [Int]) -> (Arrows -> action) -> Sub action Source #
Maps a specified list of keys to directions (up, down, left, right)