summaryrefslogtreecommitdiffhomepage
path: root/src/blog/fw-ec/kbd-sc-cb.c.gsp
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-14 10:03:19 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-14 10:08:19 +0100
commit234a47f69f0957bf3e3d268749b01e112d53bb6c (patch)
treeb6da59bc4d1bc9e93c0b0631042949bfd7ac02bc /src/blog/fw-ec/kbd-sc-cb.c.gsp
parent09e860d5a1e30901327aadb6bdfa0ee6afb00277 (diff)
Move /srp to /blog
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;