From a87e3460be918b491878b151991ece4e5246819e Mon Sep 17 00:00:00 2001 From: kitty piapiac Date: Thu, 30 Jul 2020 11:01:46 -0700 Subject: =?UTF-8?q?=CE=BB=20rework=20handling=20key=20events?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/keys.nim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/keys.nim (limited to 'src/keys.nim') diff --git a/src/keys.nim b/src/keys.nim new file mode 100644 index 0000000..bfe79aa --- /dev/null +++ b/src/keys.nim @@ -0,0 +1,18 @@ +type + KeyFunc* = enum + closeWindow, + nextWindow, + spawnCustom + + Key* = object + mods*: cuint + key*: string + keyfunc*: KeyFunc + command*: string + +proc initKey* (keyfunc: KeyFunc, mods: cuint, key: string, command = ""): Key = + return Key( + mods: mods, + key: key, + command: command, + keyfunc: keyfunc) \ No newline at end of file -- cgit v1.2.3