Skip to content

Instantly share code, notes, and snippets.

@atacratic
Created October 27, 2018 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atacratic/6514dcd93bd03a7f0a8941ea89033b58 to your computer and use it in GitHub Desktop.
Save atacratic/6514dcd93bd03a7f0a8941ea89033b58 to your computer and use it in GitHub Desktop.
lamdu-GLFW-event-trace.diff
diff --git a/src/Graphics/UI/GLFW/Events.hs b/src/Graphics/UI/GLFW/Events.hs
index eb352c2ed..4f3d5b557 100644
--- a/src/Graphics/UI/GLFW/Events.hs
+++ b/src/Graphics/UI/GLFW/Events.hs
@@ -12,6 +12,7 @@ import Data.IORef.Extended
import Data.Typeable (Typeable)
import Data.Vector.Vector2 (Vector2(..))
import qualified Graphics.UI.GLFW as GLFW
+import Debug.Trace
import Prelude
@@ -142,7 +143,7 @@ eventLoop win eventsHandler =
let addEvent event = atomicModifyIORef_ eventsVar (event:)
addKeyEvent key scanCode keyState modKeys =
- addEvent $ RawKeyEvent key scanCode keyState modKeys
+ trace ((show key) ++ "\n") $ (addEvent $ RawKeyEvent key scanCode keyState modKeys)
addMouseButtonEvent button buttonState modKeys =
addEvent $ RawMouseButton button buttonState modKeys
setCallback f cb = f win $ Just $ const cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment