From cb657fa9fc8124bdab42eb148e9b4a8ac69fc05e Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 1 Jan 2026 20:29:02 -0700 Subject: [refactor] Wetterhorn -> Montis --- plug/src/Montis/Core/KeyEvent.hs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 plug/src/Montis/Core/KeyEvent.hs (limited to 'plug/src/Montis/Core/KeyEvent.hs') diff --git a/plug/src/Montis/Core/KeyEvent.hs b/plug/src/Montis/Core/KeyEvent.hs new file mode 100644 index 0000000..cbdda4f --- /dev/null +++ b/plug/src/Montis/Core/KeyEvent.hs @@ -0,0 +1,22 @@ +module Montis.Core.KeyEvent + ( KeyEvent (..), + KeyState (..), + ) +where + +import Data.Word (Word32) +import Foreign (Ptr) +import Montis.Foreign.WlRoots + +data KeyState = KeyPressed | KeyReleased deriving (Show, Read, Eq, Enum, Ord) + +data KeyEvent = KeyEvent + { timeMs :: Word32, + keycode :: Word32, + state :: KeyState, + modifiers :: Word32, + keysym :: Word32, + codepoint :: Char, + device :: Ptr WlrInputDevice + } + deriving (Show, Ord, Eq) -- cgit