summaryrefslogtreecommitdiffhomepage
path: root/src/blog/fw-ec/kbd-sc-cb.c.gsp
diff options
context:
space:
mode:
Diffstat (limited to 'src/blog/fw-ec/kbd-sc-cb.c.gsp')
-rw-r--r--src/blog/fw-ec/kbd-sc-cb.c.gsp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/blog/fw-ec/kbd-sc-cb.c.gsp b/src/blog/fw-ec/kbd-sc-cb.c.gsp
new file mode 100644
index 0000000..31524de
--- /dev/null
+++ b/src/blog/fw-ec/kbd-sc-cb.c.gsp
@@ -0,0 +1,6 @@
+@span .c-cmt {-/* ‘make_code’ is the scancode. ‘pressed’ is a boolean that is true if this is a}
+ @span .c-cmt {-keydown event, and false if it’s a keyup. */}
+
+r = @span .c-fn {-my_handler_function}(make_code, pressed);
+@span .c-kw {-if} (r != @span .c-pp {-EC_SUCCESS})
+ @span .c-kw {-return} r;