summaryrefslogtreecommitdiffstats
path: root/users/edvorakjp/edvorakjp.h
diff options
context:
space:
mode:
authorepaew <epaew@users.noreply.github.com>2018-05-23 08:59:43 +0900
committerDrashna Jaelre <drashna@live.com>2018-05-22 16:59:43 -0700
commit760b11b5e84291019605af3abeef2d09f8991779 (patch)
tree6aa9fab3f24df6d403b3d0ed4c9955d2e2ec06cd /users/edvorakjp/edvorakjp.h
parentc465cf2fd3bc57259ad72441e462f07b694b962e (diff)
Add edvorakjp layout for the Iris keyboard (#3020)
* add edvorakjp libraries * add edvorakjp iris keymap * change the custom eeconfig's address to prevent future address conflicts * deleted the verbose line of rule.mk
Diffstat (limited to 'users/edvorakjp/edvorakjp.h')
-rw-r--r--users/edvorakjp/edvorakjp.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h
new file mode 100644
index 0000000000..c38a9d1fa9
--- /dev/null
+++ b/users/edvorakjp/edvorakjp.h
@@ -0,0 +1,74 @@
+#ifndef USERSPACE
+#define USERSPACE
+
+#include "quantum.h"
+#include "action_layer.h"
+
+#define EECONFIG_EDVORAK (uint8_t *)20
+
+extern keymap_config_t keymap_config;
+
+typedef union {
+ uint8_t raw;
+ struct {
+ bool enable_jp_extra_layer : 1;
+ bool enable_kc_lang : 1; // for macOS
+ };
+} edvorakjp_config_t;
+
+enum edvorakjp_layers {
+ _EDVORAK = 0,
+ _EDVORAKJ1,
+ _EDVORAKJ2,
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+ _EXTRA,
+};
+
+enum edvorakjp_keycodes {
+ EDVORAK = SAFE_RANGE,
+ QWERTY,
+ LOWER,
+ RAISE,
+ KC_MAC,
+ KC_WIN,
+ KC_EXTON,
+ KC_EXTOFF,
+ KC_JPN,
+ KC_ENG,
+ KC_AI,
+ KC_OU,
+ KC_EI,
+ KC_ANN,
+ KC_ONN,
+ KC_ENN,
+ KC_INN,
+ KC_UNN,
+ NEW_SAFE_RANGE
+};
+
+uint8_t eeconfig_read_edvorakjp(void);
+void eeconfig_update_edvorakjp(uint8_t val);
+
+void dvorakj_layer_off(void);
+void update_japanese_mode(bool new_state);
+void matrix_init_user(void);
+void matrix_init_keymap(void);
+uint32_t layer_state_set_user(uint32_t state);
+uint32_t layer_state_set_keymap(uint32_t state);
+
+/*
+ * Each process_record_* methods defined here are
+ * return false if processed, or return true if not processed.
+ * You can add your original macros in process_record_keymap() in keymap.c.
+ */
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
+bool process_record_edvorakjp_ext(uint16_t keycode, keyrecord_t *record);
+bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record);
+bool process_record_layer(uint16_t keycode, keyrecord_t *record);
+bool process_record_ime(uint16_t keycode, keyrecord_t *record);
+bool process_record_user(uint16_t keycode, keyrecord_t *record);
+
+#endif