summaryrefslogtreecommitdiff
path: root/crkbd
diff options
context:
space:
mode:
Diffstat (limited to 'crkbd')
-rw-r--r--crkbd/config.h17
-rw-r--r--crkbd/keymap.c23
2 files changed, 36 insertions, 4 deletions
diff --git a/crkbd/config.h b/crkbd/config.h
index 96ffc1e..ac17ea4 100644
--- a/crkbd/config.h
+++ b/crkbd/config.h
@@ -1,5 +1,18 @@
-// Copyright Christoph Cullmann
-// SPDX-License-Identifier: GPL-2.0+
+/* Copyright 2022 Christoph Cullmann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#pragma once
diff --git a/crkbd/keymap.c b/crkbd/keymap.c
index 3bbc212..52a1ec0 100644
--- a/crkbd/keymap.c
+++ b/crkbd/keymap.c
@@ -1,8 +1,27 @@
-// Copyright Christoph Cullmann
-// SPDX-License-Identifier: GPL-2.0+
+/* Copyright 2022 Christoph Cullmann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include QMK_KEYBOARD_H
+// Returns true if `pos` on the left hand of the keyboard, false if right.
+static bool on_left_hand(keypos_t pos)
+{
+ return pos.row < MATRIX_ROWS / 2;
+}
+
// layout helper macro, we just use 42 keys
#undef LAYOUT
#define LAYOUT(\