From b62f2c46820328faea6576bc4b9764b66c1f569b Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Sun, 2 Jun 2013 13:32:00 -0400 Subject: [PATCH] keydown detection notes --- simpledisplay.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simpledisplay.d b/simpledisplay.d index ec5d16b..07c339c 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -158,7 +158,7 @@ void displayImage(Image image, SimpleWindow win = null) { p.drawImage(Point(0, 0), image); } win.eventLoop(0, - (int) { + (int, bool pressed) { win.close(); } ); } else { @@ -326,7 +326,7 @@ class SimpleWindow { handlePulse = handler; } else static if(__traits(compiles, handleMouseEvent = handler)) { handleMouseEvent = handler; - } else static assert(0, "I can't use this event handler " ~ typeof(handler).stringof); + } else static assert(0, "I can't use this event handler " ~ typeof(handler).stringof ~ "\nNote: if you want to capture keycode events, this recently changed to (int code, bool pressed) instead of the old (int code)"); }