]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge pull request #1418 from npoirey/master
authorJack Humbert <jack.humb@gmail.com>
Fri, 23 Jun 2017 22:05:33 +0000 (18:05 -0400)
committerGitHub <noreply@github.com>
Fri, 23 Jun 2017 22:05:33 +0000 (18:05 -0400)
Frenchdev v1

28 files changed:
docs/_summary.md
docs/adding_a_keyboard_to_qmk.md [new file with mode: 0644]
docs/porting_your_keyboard_to_qmk.md
keyboards/ergodox/ez/ez.c
keyboards/ergodox/keymaps/333fred/Makefile
keyboards/ergodox/keymaps/333fred/README.md
keyboards/ergodox/keymaps/333fred/config.h [new file with mode: 0644]
keyboards/ergodox/keymaps/333fred/keymap.c
keyboards/gh60/gh60.c
keyboards/pegasushoof/pegasushoof.c
keyboards/phantom/config.h
keyboards/phantom/keymaps/default/Makefile [new file with mode: 0644]
keyboards/phantom/keymaps/default/config.h [new file with mode: 0644]
keyboards/phantom/keymaps/default/keymap.c
keyboards/phantom/keymaps/default/readme.md [new file with mode: 0644]
keyboards/phantom/keymaps/rgbmod/Makefile [new file with mode: 0644]
keyboards/phantom/keymaps/rgbmod/config.h [new file with mode: 0644]
keyboards/phantom/keymaps/rgbmod/keymap.c [new file with mode: 0644]
keyboards/phantom/led.c [deleted file]
keyboards/phantom/phantom.c
keyboards/phantom/phantom.h
keyboards/phantom/pinout.txt [deleted file]
keyboards/phantom/readme.md
keyboards/phantom/rules.mk
keyboards/s65_x/keymaps/default/keymap.c
keyboards/s65_x/keymaps/iso/keymap.c
keyboards/s65_x/keymaps/nall/keymap.c
keyboards/xd60/xd60.c

index 420003996f171944d85dee52a336fc0ac25c8d57..23128cafe4e916b4485069e117ab6bd172148496 100644 (file)
@@ -19,8 +19,9 @@
 * [FAQ: Compiling QMK](faq_build.md)
   
 ### For hardware makers and modders
-* [Modding your keyboard](modding_your_keyboard.md)
+* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
 * [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
+* [Modding your keyboard](modding_your_keyboard.md)
 * [Adding features to QMK](adding_features_to_qmk.md)
   
 ### Other topics
diff --git a/docs/adding_a_keyboard_to_qmk.md b/docs/adding_a_keyboard_to_qmk.md
new file mode 100644 (file)
index 0000000..51c4c44
--- /dev/null
@@ -0,0 +1,35 @@
+# Adding your keyboard to QMK
+
+We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
+
+## Naming your directory/project
+
+All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Dashes (`-`) aren't allow by our build system, and will confuse it with keymaps/subprojects. Your directory and your `.h` and `.c` files should have exactly the same name. Subprojects/revision should follow the same format. 
+
+## `readme.md`
+
+All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to move information (template coming).
+
+## Image/Hardware files
+
+In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the readme.md is the preferred method.
+
+Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be store, and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
+
+## Non-production/handwired projects
+
+We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder! 
+
+## Warnings as errors
+
+When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
+
+## Licenses
+
+If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, it this format:
+
+    Copyright 2017 Your Name <your@email.com>
+    
+## Technical details
+
+If you're looking for more information on making your keyboard work with QMK, [check out this guide](porting_your_keyboard_to_qmk.md)!
index 6f291a432d628eb9965fa319e0ea91db853057af..05787042fd76bb3c8abca1498b687c1948123084 100644 (file)
@@ -1,3 +1,7 @@
+# Porting your keyboard to QMK
+
+This page describes the technical details of porting an existing keyboard to QMK. If you're looking to add your keyboard to QMK, please [look through these guidelines](adding_a_keyboard_to_qmk.md)!
+
 If your keyboard is running an Atmega chip (atmega32u4 and others), it's pretty easy to get things setup for compiling your own firmware to flash onto your board. There is a `/util/new_project.sh <keyboard>` script to help get you started - you can simply pass your keyboard's name into the script, and all of the necessary files will be created. The components of each are described below.
 
 ## `/keyboards/<keyboard>/config.h`
@@ -34,7 +38,7 @@ At the bottom of the file, you'll find lots of features to turn on and off - all
 
 ## `/keyboards/<keyboard>/readme.md`
 
-This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well. This file will be rendered into a webpage at qmk.fm/keyboards/<keyboard>/.
+This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well, as long as they're hosted elsewhere (imgur).
 
 ## `/keyboards/<keyboard>/<keyboard>.c`
 
index 3e19f23028076a38d309734457987ac9a104aa56..d502249543837cda54bf519c34378b218deccd5e 100644 (file)
@@ -1,6 +1,30 @@
 #include "ez.h"
 #include "i2cmaster.h"
 
+
+extern inline void ergodox_board_led_on(void);
+extern inline void ergodox_right_led_1_on(void);
+extern inline void ergodox_right_led_2_on(void);
+extern inline void ergodox_right_led_3_on(void);
+extern inline void ergodox_right_led_on(uint8_t led);
+
+extern inline void ergodox_board_led_off(void);
+extern inline void ergodox_right_led_1_off(void);
+extern inline void ergodox_right_led_2_off(void);
+extern inline void ergodox_right_led_3_off(void);
+extern inline void ergodox_right_led_off(uint8_t led);
+
+extern inline void ergodox_led_all_on(void);
+extern inline void ergodox_led_all_off(void);
+
+extern inline void ergodox_right_led_1_set(uint8_t n);
+extern inline void ergodox_right_led_2_set(uint8_t n);
+extern inline void ergodox_right_led_3_set(uint8_t n);
+extern inline void ergodox_right_led_set(uint8_t led, uint8_t n);
+
+extern inline void ergodox_led_all_set(uint8_t n);
+
+
 bool i2c_initialized = 0;
 uint8_t mcp23018_status = 0x20;
 
@@ -57,7 +81,7 @@ uint8_t init_mcp23018(void) {
     // cli();
     if (i2c_initialized == 0) {
         i2c_init();  // on pins D(1,0)
-        i2c_initialized++;
+        i2c_initialized = true;
         _delay_ms(1000);
     }
 
index b977722a2f827a70c0dc8f4b3efe3c5d95b8ef76..17f736458c673a469fdbc853b2bfe3259bfe089b 100644 (file)
@@ -2,7 +2,6 @@ SUBPROJECT_DEFAULT = infinity
 LCD_BACKLIGHT_ENABLE = yes
 LCD_ENABLE = yes
 BACKLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
 NKRO_ENABLE = yes
 TAP_DANCE_ENABLE = yes
 
index af8042d8598a22ee03bfb02261f57b423b349fbb..f7b4ca42f4aaf7a1b78070dc3a739dfae0b1d5df 100644 (file)
@@ -14,7 +14,7 @@
   |LCTRL |  F4  |  F5  | LGUI | LALT |                                       | Left | Down |  Up  | Right| RGUI |
   `----------------------------------'                                       `----------------------------------'
                                        ,-------------.       ,-------------.
-                                       | Home | End  |       | Alt  |Ctrl/Esc|
+                                       | Copy | Paste|       | Alt  |Ctrl/Esc|
                                 ,------|------|------|       |------+--------+------.
                                 |      |      | PgUp |       | PgDn |        |      |
                                 | Bcksp|OSL(2)|------|       |------|  Ent   |Space |
 |        |      |      |      |      |      |  F10 |           |  F11 |      |      |      |      |      |        |
 |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 |        |      |      |      |      |      |------|           |------|      |      |      |      |      |        |
-|--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|--------+------+------+------+------+------|  L2  |           |      |------+------+------+------+------+--------|
 |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
 `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
-  |      |      |      |      |      |                                       |      |      |      |      |      |
+  |      |      |      |      |      |                                       | F12  |GoToIm| FAR  |      |      |
   `----------------------------------'                                       `----------------------------------'
                                        ,-------------.       ,---------------.
-                                       |Format|      |       | Test | DTest  |
+                                       |Format|Build |       | Test | DTest  |
                                 ,------|------|------|       |------+--------+------.
-                                |      |      |Refact|       |      |        |      |
+                                |      |      |Refact|       |Sort U|        |      |
                                 |      |      |------|       |------|        |      |
                                 |      |      |      |       |      |        |      |
                                 `--------------------'       `----------------------'
 ```
+* Build  - Visualt Studio Build Solution. Sends `CTRL + SHFT + B`
+* DTest  - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T`
+* FAR    - Visual Studio Find All References. Sends `CTRL + K, R`
 * Format - Visual Studio Format. Sends `CTRL + K, CTRL + D`
+* GoToIm - Visual Studio Go To Implementation. Sends `CTRL + F12`
 * Refact - Visual Studio Refactor. Sends `CTRL + R, R`
+* Sort U - Visual Studio Sort Usings. Sends `CTRL + R, CTRL + G`
 * Test   - Visual Studio Run Test. Sends `CTRL + R, T`
-* DTest  - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T`
+
 
 ### Keymap 2: Symbol Layer
 ```
@@ -87,9 +92,9 @@
   |      |      |      | Lclk | Rclk |                                       |      |      |      |      |      |
   `----------------------------------'                                       `----------------------------------'
                                        ,-------------.       ,-------------.
-                                       |      |      |       | Vol+ |      |
+                                       | Back+| Back-|       | Vol+ |      |
                                 ,------|------|------|       |------+------+------.
-                                |      |      |      |       | Vol- |      |      |
+                                |      |      |BL_TOG|       | Vol- |      |      |
                                 |      |      |------|       |------| PL/PS| Next |
                                 |      |      |      |       | Back |      |      |
                                 `--------------------'       `--------------------'
 ,--------------------------------------------------.           ,--------------------------------------------------.
 |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
 |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
-|        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+|        |KOpen |KType |      |      |      |      |           |      | Copy |      |      |      | Paste|        |
 |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
-|        |DLeft |DRight|LShift|      |      |------|           |------| Left | Down |  Up  | Right|      |        |
+|        |DLeft |DRight| LCTL |      |      |------|           |------| Left | Down |  Up  | Right|      |        |
 |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
-|        |KOpen |KType |      |      |      |      |           |      |      |      |      |      |      |        |
+|        |SFT_TB| Tab  |      |      |      |      |           |      |      |      |      |      |      |        |
 `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
   |      |      |      |      |      |                                       |      |      |      |      |      |
   `----------------------------------'                                       `----------------------------------'
                                        ,-------------.       ,-------------.
-                                       |      |      |       |      |      |
+                                       |      |      |       | Home | End  |
                                 ,------|------|------|       |------+------+------.
                                 |      |      |      |       |      |      |      |
-                                |      | CTRL |------|       |------|      |      |
+                                |      | LSFT |------|       |------|      |      |
                                 |      |      |      |       |      |      |      |
                                 `--------------------'       `--------------------'
 ```
-* DLeft - Move to the left Desktop. Sends `Ctrl + Win + Left Arrow`
+* DLeft  - Move to the left Desktop. Sends `Ctrl + Win + Left Arrow`
 * DRight - Move to the right Desktop. Sends `Ctrl + Win + Right Arrow`
-* KOpen - Opens KeePass. Sends `Ctrl + Alt + k`
-* KType - Autotypes KeePass password. Sends `Ctrl + Alt + a`
+* KOpen  - Opens KeePass. Sends `Ctrl + Alt + k`
+* KType  - Autotypes KeePass password. Sends `Ctrl + Alt + a`
+* SFT_TB - Sends `CTRL + TAB`.
diff --git a/keyboards/ergodox/keymaps/333fred/config.h b/keyboards/ergodox/keymaps/333fred/config.h
new file mode 100644 (file)
index 0000000..f19a52b
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef CONFIG_H_
+#define CONFIG_H_
+
+#include "../../config.h"
+
+#undef TAPPING_TERM
+#define TAPPING_TERM 150
+
+#define PERMISSIVE_HOLD
+
+#endif
index 070ad1f72a2653d571b26f341934272c56ee45ec..e3f95132d3c61142c5c73698b137f001d59f26db 100644 (file)
@@ -23,12 +23,17 @@ enum custom_macros {
   DLEFT,
   DRIGHT,
   PSCREEN_APP,
+  LSFT_TAB,
 
   // VS Macros
   REFACTOR,
   TEST,
   DEBUG_TEST,
   FORMAT,
+  BUILD,
+  GO_TO_IMPL,
+  FIND_ALL_REF,
+  REMOVE_SORT_USINGS,
 
   // KeePass macros
   KEEPASS_OPEN,
@@ -61,11 +66,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  *   |LCTRL |  F4  |  F5  | LGUI | LALT |                                       | Left | Down |  Up  | Right| RGUI |
  *   `----------------------------------'                                       `----------------------------------'
  *                                        ,-------------.       ,-------------.
- *                                        | Home | End  |       | Alt  |Ctrl/Esc|
+ *                                        | Copy | Paste|       | Alt  |Ctrl/Esc|
  *                                 ,------|------|------|       |------+--------+------.
  *                                 |      |      | PgUp |       | PgDn |        |      |
  *                                 | Bcksp|OSL(2)|------|       |------|  Ent   |Space |
- *                                 |      |      | Del  |       |OSL(2)|        |      |
+ *                                 |      |      | Del  |       | RCtrl|        |      |
  *                                 `--------------------'       `----------------------'
  */
 // If it accepts an argument (i.e, is a function), it doesn't need KC_.
@@ -75,20 +80,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         KC_GRV,        KC_1,         KC_2,   KC_3,   KC_4,          KC_5,   KC_EQL,
         KC_TAB,        KC_Q,         KC_W,   KC_E,   KC_R,          KC_T,   TG(SYMB),
         KC_ESC,        KC_A,         KC_S,   KC_D,   LT(MOVE, KC_F),KC_G,
-        KC_LSFT,       CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,          KC_B,   TG(CODE),
-        KC_LCTRL,      KC_F4,        KC_F5,  KC_LGUI,KC_LALT,
-                                                                             KC_HOME,  KC_END,
-                                                                                       KC_PGUP,
-                                                                     KC_BSPC,OSL(SYMB),KC_DEL,
+        OSM(MOD_LSFT), CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,          KC_B,   TG(CODE),
+        OSM(MOD_LCTL), KC_F4,        KC_F5,  KC_LGUI,KC_LALT,
+                                                                             LCTL(KC_C),LCTL(KC_V),
+                                                                                        KC_PGUP,
+                                                                     KC_BSPC,OSL(SYMB), KC_DEL,
         // right hand
              TG(CODE),    KC_6,   KC_7,   KC_8,   KC_9,   KC_0,                  KC_MINS,
              TG(SYMB),    KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,                  KC_BSLS,
                           KC_H,   KC_J,   KC_K,   KC_L,   TD(TD_SEMICOLON_COLON),KC_QUOT,
-             MO(MDIA),    KC_N,   KC_M,   KC_COMM,KC_DOT, CTL_T(KC_SLSH),        KC_RSFT,
+             MO(MDIA),    KC_N,   KC_M,   KC_COMM,KC_DOT, CTL_T(KC_SLSH),        OSM(MOD_RSFT),
                                   KC_LEFT,KC_DOWN,KC_UP,  KC_RIGHT,          KC_RGUI,
-             KC_RALT,        CTL_T(KC_ESC),
+             KC_RALT, CTL_T(KC_ESC),
              KC_PGDN,
-             OSL(SYMB),KC_ENT, KC_SPC
+             KC_RCTL, KC_ENT, KC_SPC
     ),
 /* Keymap 1: Code Layer
  *
@@ -98,15 +103,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |        |      |      |      |      |      |  F10 |           |  F11 |      |      |      |      |      |        |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
  * |        |      |      |      |      |      |------|           |------|      |      |      |      |      |        |
- * |--------+------+------+------+------+------|ACCESS|           |      |------+------+------+------+------+--------|
+ * |--------+------+------+------+------+------|  L2  |           |      |------+------+------+------+------+--------|
  * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
  * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
- *   |      |      |      |      |      |                                       |      |      |      |      |      |
+ *   |      |      |      |      |      |                                       | F12  |GoToIm|  FAR |      |      |
  *   `----------------------------------'                                       `----------------------------------'
  *                                        ,-------------.       ,---------------.
- *                                        |Format|      |       | Test | DTest  |
+ *                                        |Format|Build |       | Test | DTest  |
  *                                 ,------|------|------|       |------+--------+------.
- *                                 |      |      |Refact|       |      |        |      |
+ *                                 |      |      |Refact|       |Sort U|        |      |
  *                                 |      |      |------|       |------|        |      |
  *                                 |      |      |      |       |      |        |      |
  *                                 `--------------------'       `----------------------'
@@ -118,20 +123,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
         KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F10,
         KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(SYMB),
         KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-                                                                             M(FORMAT), KC_TRNS,
-                                                                                      M(REFACTOR),
-                                                                    KC_TRNS, KC_TRNS, KC_TRNS,
+                                                                             M(FORMAT),M(BUILD),
+                                                                                       M(REFACTOR),
+                                                                    KC_TRNS, KC_TRNS,  KC_TRNS,
         // right hand
 
-            KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-            KC_F11,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-                     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-            KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-                              KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+            KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_TRNS,        KC_TRNS, KC_TRNS,
+            KC_F11,  KC_TRNS, KC_TRNS, KC_TRNS,      KC_TRNS,        KC_TRNS, KC_TRNS,
+                     KC_TRNS, KC_TRNS, KC_TRNS,      KC_TRNS,        KC_TRNS, KC_TRNS,
+            KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_TRNS,        KC_TRNS, KC_TRNS,
+                              KC_F12,  M(GO_TO_IMPL),M(FIND_ALL_REF),KC_TRNS, KC_TRNS,
              M(TEST), M(DEBUG_TEST),
-             KC_TRNS,
+             M(REMOVE_SORT_USINGS),
              KC_TRNS, KC_TRNS, KC_TRNS
     ),
 /* Keymap 2: Symbol Layer
@@ -142,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |         |   !  |   @  |   (  |   )  |   |  |ACCESS|           |ACCESS|   Up |   7  |   8  |   9  |   *  |   F12  |
  * |---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
  * |         |   #  |   $  |   {  |   }  |   `  |------|           |------| Down |   4  |   5  |   6  |   +  |        |
- * |---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |---------+------+------+------+------+------|ACCESS|           |      |------+------+------+------+------+--------|
  * |         |   %  |   ^  |   [  |   ]  |   ~  |      |           |      |   &  |   1  |   2  |   3  |   \  |        |
  * `---------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
  *   | EPRM  |      |      |      |      |                                       |   0  |   0  |   .  |   =  |      |
@@ -190,9 +195,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  *   |      |      |      | Lclk | Rclk |                                       |      |      |      |      |      |
  *   `----------------------------------'                                       `----------------------------------'
  *                                        ,-------------.       ,-------------.
- *                                        |      |      |       | Vol+ |      |
+ *                                        | Back+| Back-|       | Vol+ |      |
  *                                 ,------|------|------|       |------+------+------.
- *                                 |      |      |      |       | Vol- |      |      |
+ *                                 |      |      |BackTg|       | Vol- |      |      |
  *                                 |      |      |------|       |------| PL/PS| Next |
  *                                 |      |      |      |       | Back |      |      |
  *                                 `--------------------'       `--------------------'
@@ -204,8 +209,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
        KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
-                                           KC_TRNS, KC_TRNS,
-                                                    KC_TRNS,
+                                           BL_INC,  BL_DEC,
+                                                    BL_TOGG,
                                   KC_TRNS, KC_TRNS, KC_TRNS,
     // right hand
        KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -222,39 +227,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * ,--------------------------------------------------.           ,--------------------------------------------------.
  * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
  * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
- * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |        |KOpen |KType |      |      |      |      |           |      | Copy |      |      |      | Paste|        |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |DLeft |DRight|LShift|ACCESS|      |------|           |------| Left | Down |  Up  | Right|      |        |
+ * |        |DLeft |DRight|LCTRL |ACCESS|      |------|           |------| Left | Down |  Up  | Right|      |        |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |KOpen |KType |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |        |SFT_TB| TAB  |      |      |      |      |           |      |      |      |      |      |      |        |
  * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
  *   |      |      |      |      |      |                                       |      |      |      |      |      |
  *   `----------------------------------'                                       `----------------------------------'
  *                                        ,-------------.       ,-------------.
- *                                        |      |      |       |      |      |
+ *                                        |      |      |       | Home | End  |
  *                                 ,------|------|------|       |------+------+------.
  *                                 |      |      |      |       |      |      |      |
- *                                 |      | CTRL |------|       |------|      |      |
+ *                                 |      |LSHIFT|------|       |------|      |      |
  *                                 |      |      |      |       |      |      |      |
  *                                 `--------------------'       `--------------------'
  */
 // MEDIA AND MOUSE
 [MOVE] = KEYMAP(
        KC_TRNS, KC_TRNS,        KC_TRNS,        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-       KC_TRNS, KC_TRNS,        KC_TRNS,        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-       KC_TRNS, M(DLEFT),       M(DRIGHT),      KC_LSFT, KC_TRNS, KC_TRNS,
        KC_TRNS, M(KEEPASS_OPEN),M(KEEPASS_TYPE),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, M(DLEFT),       M(DRIGHT),      KC_LCTL, KC_TRNS, KC_TRNS,
+       KC_TRNS, M(LSFT_TAB),    KC_TAB,         KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS,        KC_TRNS,        KC_TRNS, KC_TRNS,
                                              KC_TRNS, KC_TRNS,
                                                       KC_TRNS,
-                                    KC_TRNS, KC_LCTRL,KC_TRNS,
+                                    KC_TRNS, KC_LSFT, KC_TRNS,
     // right hand
-       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-                 KC_LEFT, KC_DOWN, KC_UP,   KC_RIGHT,KC_TRNS, KC_TRNS,
-       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-                          KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-       KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS,   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,   KC_TRNS,
+       KC_TRNS,  LCTL(KC_C),KC_TRNS, KC_TRNS, KC_TRNS, LCTL(KC_V),KC_TRNS,
+                 KC_LEFT,   KC_DOWN, KC_UP,   KC_RIGHT,KC_TRNS,   KC_TRNS,
+       KC_TRNS,  KC_TRNS,   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,   KC_TRNS,
+                            KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,   KC_TRNS,
+       KC_HOME,  KC_END,
        KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS
 
@@ -291,9 +296,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
           break;
         case PSCREEN_APP:
           if (record->event.pressed) {
-            return MACRO(D(LALT), T(PSCR), U(LALT));
+            return MACRO(D(LALT), T(PSCR), U(LALT), END);
           }
           break;
+        case LSFT_TAB:
+          if (record->event.pressed) {
+            return MACRO(D(LSFT), T(TAB), U(LSFT), END);
+          }
         case REFACTOR:
           if (record->event.pressed) { // VS Refactor CTRL+R, R
             return MACRO(D(LCTL), T(R), U(LCTL), T(R), END);
@@ -314,6 +323,26 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             return MACRO(D(LCTL), T(K), T(D), U(LCTL), END);
           }
           break;
+        case BUILD:
+          if (record->event.pressed) { // VS Build. Sends CTRL+SHFT+B
+            return MACRO(D(LCTL), D(LSFT), T(B), U(LSFT), U(LCTL), END);
+          }
+          break;
+        case GO_TO_IMPL:
+          if (record->event.pressed) { // VS Go To Implementation. Sends CTRL+F12
+            return MACRO(D(LCTL), T(F12), U(LCTL), END);
+          }
+          break;
+        case FIND_ALL_REF:
+          if (record->event.pressed) { // VS Find All References. Sends CTRL+K, R
+            return MACRO(D(LCTL), T(K), U(LCTL), T(R), END);
+          }
+          break;
+        case REMOVE_SORT_USINGS:
+          if (record->event.pressed) {
+            return MACRO(D(LCTL), T(R), T(G), U(LCTL), END);
+          }
+          break;
         case KEEPASS_OPEN:
           if (record->event.pressed) { // Keepass open application
             return MACRO(D(LCTL), D(LALT), T(K), U(LALT), U(LCTL), END);
index f5a158e12f99bd1e2a6d306e232e3d145057f8f8..441c799fa378918085f65987e7a784fa2a607295 100644 (file)
@@ -1,25 +1,39 @@
 #include "gh60.h"
 
+
+extern inline void gh60_caps_led_on(void);
+extern inline void gh60_poker_leds_on(void);
+extern inline void gh60_fn_led_on(void);
+extern inline void gh60_esc_led_on(void);
+extern inline void gh60_wasd_leds_on(void);
+
+extern inline void gh60_caps_led_off(void);
+extern inline void gh60_poker_leds_off(void);
+extern inline void gh60_fn_led_off(void);
+extern inline void gh60_esc_led_off(void);
+extern inline void gh60_wasd_leds_off(void);
+
+
 void led_set_kb(uint8_t usb_led) {
        // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
-       
+
     if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
                gh60_caps_led_on();
                } else {
-               gh60_caps_led_off(); 
+               gh60_caps_led_off();
     }
-       
+
     // if (usb_led & (1<<USB_LED_NUM_LOCK)) {
                // gh60_esc_led_on();
                // } else {
-               // gh60_esc_led_off(); 
+               // gh60_esc_led_off();
     // }
-       
+
     // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
                // gh60_fn_led_on();
                // } else {
-               // gh60_fn_led_off();   
+               // gh60_fn_led_off();
     // }
 
-       led_set_user(usb_led);  
+       led_set_user(usb_led);
 }
index 6bb249aef4efd35e83a4a6ac6081b300d7256f4c..cde814812e5bb85883a3bf78a03d1e61ab87246f 100644 (file)
@@ -17,6 +17,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include "pegasushoof.h"
 
+
+extern inline void ph_caps_led_on(void);
+extern inline void ph_caps_led_off(void);
+
+extern inline void ph_sclk_led_on(void);
+extern inline void ph_sclk_led_off(void);
+
+
 __attribute__ ((weak))
 void matrix_init_user(void) {
 };
index 71a33498b4fd9550216d247c4eea47b3657aa7e7..5b7fa62ff5070bf1900be33f342847c8d99b7816 100644 (file)
@@ -24,9 +24,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define VENDOR_ID       0xFEED
 #define PRODUCT_ID      0x6060
 #define DEVICE_VER      0x0003
-#define MANUFACTURER    PHANTOM
-#define PRODUCT         PHANTOM RGB MOD
-#define DESCRIPTION     QMK keyboard firmware for PHANTOM TKL
+#define MANUFACTURER    bpiphany
+#define PRODUCT         PHANTOM
+#define DESCRIPTION     QMK keyboard firmware for PHANTOM
 
 /* key matrix size */
 #define MATRIX_ROWS 6
@@ -44,6 +44,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* COL2ROW or ROW2COL */
 #define DIODE_DIRECTION ROW2COL
 
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+/* Underlight configuration
+ */
+#define RGB_DI_PIN E2
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 20     // Number of LEDs
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
+
 /* define if matrix has ghost */
 //#define MATRIX_HAS_GHOST
 
@@ -55,19 +68,79 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-/* key combination for command */
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
 #define IS_COMMAND() ( \
     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
 )
 
-/* Underlight configuration
- */
-#define RGB_DI_PIN E2
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 20     // Number of LEDs
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-#define RGBLIGHT_VAL_STEP 17
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1          H
+//#define MAGIC_KEY_HELP2          SLASH
+//#define MAGIC_KEY_DEBUG          D
+//#define MAGIC_KEY_DEBUG_MATRIX   X
+//#define MAGIC_KEY_DEBUG_KBD      K
+//#define MAGIC_KEY_DEBUG_MOUSE    M
+//#define MAGIC_KEY_VERSION        V
+//#define MAGIC_KEY_STATUS         S
+//#define MAGIC_KEY_CONSOLE        C
+//#define MAGIC_KEY_LAYER0_ALT1    ESC
+//#define MAGIC_KEY_LAYER0_ALT2    GRAVE
+//#define MAGIC_KEY_LAYER0         0
+//#define MAGIC_KEY_LAYER1         1
+//#define MAGIC_KEY_LAYER2         2
+//#define MAGIC_KEY_LAYER3         3
+//#define MAGIC_KEY_LAYER4         4
+//#define MAGIC_KEY_LAYER5         5
+//#define MAGIC_KEY_LAYER6         6
+//#define MAGIC_KEY_LAYER7         7
+//#define MAGIC_KEY_LAYER8         8
+//#define MAGIC_KEY_LAYER9         9
+//#define MAGIC_KEY_BOOTLOADER     PAUSE
+//#define MAGIC_KEY_LOCK           CAPS
+//#define MAGIC_KEY_EEPROM         E
+//#define MAGIC_KEY_NKRO           N
+//#define MAGIC_KEY_SLEEP_LED      Z
 
 /*
  * Feature disable options
@@ -87,4 +160,27 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //#define NO_ACTION_MACRO
 //#define NO_ACTION_FUNCTION
 
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+   - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+   - MIDI notes can be added to the keymap
+   - Octave shift and transpose
+   - Virtual sustain, portamento, and modulation wheel
+   - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
 #endif
diff --git a/keyboards/phantom/keymaps/default/Makefile b/keyboards/phantom/keymaps/default/Makefile
new file mode 100644 (file)
index 0000000..555ac79
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright 2013 Jun Wako <wakojun@gmail.com>
+#
+# 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/>.
+
+
+# QMK Build Options
+#   change to "no" to disable the options, or define them in the Makefile in
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = yes        # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/phantom/keymaps/default/config.h b/keyboards/phantom/keymaps/default/config.h
new file mode 100644 (file)
index 0000000..a3828f7
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * 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/>.
+ */
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif
index a4fc319ac8b946467aef8400ec0ec595f329a804..1568d0a143137b0ad3eb5443a35774859625b123 100644 (file)
@@ -1,7 +1,22 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * 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 "phantom.h"
 
-// Used for SHIFT_ESC
-#define MODS_CTRL_MASK  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
+// Helpful defines
+#define _______ KC_TRNS
 
 // Each layer gets a name for readability, which is then used in the keymap matrix below.
 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
 #define _FL 1
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-  /* Keymap _BL: (Base Layer) Default Layer
-   * ,-----------------------------------------------------------------------------.
-   * |Esc  |f1| f2| f3| f4|  | f5| f6| f7| f8|   | f9|f10|f11|f12|     |Prnt|ScLk|Paus|
-   * |-----------------------------------------------------------|     |--------------|
-   * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |  0| - | = |Backsp |     | Ins|Home|PgUp|
-   * |-----------------------------------------------------------|     |--------------|
-   * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \|     | Del| End|PgDn|
-   * |-----------------------------------------------------------|     `--------------'
-   * |CAPS   |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return |
-   * |-----------------------------------------------------------|              ,----.
-   * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |              | Up |
-   * |-----------------------------------------------------------|      ,-------------.
-   * |Ctrl|Gui |Alt |      Space            |ALT |GUI |_FL |CTRL |      |Lft| Dn |Rig |
-   * `-----------------------------------------------------------'      `-------------'
-   */
-[_BL] = KEYMAP(
-  KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
-  KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
-  KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_END, KC_PGDN, \
-  KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,  \
-  KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
-  KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
-
-  /* Keymap _FL: Function Layer
-   * ,-----------------------------------------------------------------------------.
-   * |     |  |   |   |   |  |   |   |   |   |   |   |   |   |   |     |    |    |    |
-   * |-----------------------------------------------------------|     |--------------|
-   * |   |   |   |   |   |   |   |   |   |   |   |   |   | Reset |     |    |    |    |
-   * |-----------------------------------------------------------|     |--------------|
-   * |     |   |   |   |   |   |   |   |   |   |   |   |   |     |     |    |    |    |
-   * |-----------------------------------------------------------|     `--------------'
-   * |       |   |   |   |   |   |   |   |   |   |   |   |       |
-   * |-----------------------------------------------------------|              ,----.
-   * |        | F1| F2| F3| F4| F5|F6 |F7 |F8 |   |   |          |              |    |
-   * |-----------------------------------------------------------|      ,-------------.
-   * |    |    |    |                       |    |    |    |     |      |   |    |    |
-   * `-----------------------------------------------------------'      `-------------'
-   */
-[_FL] = KEYMAP(
-  #ifdef RGBLIGHT_ENABLE
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,   KC_TRNS,  KC_TRNS, KC_UP, KC_TRNS, \
-  KC_TRNS,  RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
-  #else
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,   KC_TRNS,  KC_TRNS, KC_UP, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
-  KC_TRNS,  KC_TRNS, KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
-  #endif
+    [_BL] = KEYMAP(
+        KC_ESC,           KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,       KC_PSCR, KC_SLCK, KC_BRK,  \
+        KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSPC,      KC_INS,  KC_HOME, KC_PGUP, \
+        KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,      KC_DEL,  KC_END,  KC_PGDN, \
+        KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT,          KC_ENT,                                  \
+        KC_LSFT,          KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH,          KC_RSFT,               KC_UP,            \
+        KC_LCTL, KC_LGUI, KC_LALT,                            KC_SPC,                             KC_RALT, KC_RGUI, MO(_FL), KC_RCTL,      KC_LEFT, KC_DOWN, KC_RGHT  \
+    ),
+    [_FL] = KEYMAP(
+        _______,          _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT,      KC_MUTE, KC_VOLD, KC_VOLU, \
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,      _______, _______, _______, \
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSEL,      _______, _______, _______, \
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,          _______,                                 \
+        _______,          _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______,          _______,               _______,          \
+        _______, _______, _______,                            _______,                            _______, _______, _______, _______,      _______, _______, _______  \
+    ),
 };
 
-enum function_id {
-    SHIFT_ESC,
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+    // MACRODOWN only works in this function
+    switch(id) {
+        case 0:
+            if (record->event.pressed) {
+                register_code(KC_RSFT);
+            } else {
+                unregister_code(KC_RSFT);
+            }
+            break;
+    }
+    return MACRO_NONE;
 };
 
-const uint16_t PROGMEM fn_actions[] = {
-  [0]  = ACTION_FUNCTION(SHIFT_ESC),
-};
 
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
-  static uint8_t shift_esc_shift_mask;
-  switch (id) {
-    case SHIFT_ESC:
-      shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
-      if (record->event.pressed) {
-        if (shift_esc_shift_mask) {
-          add_key(KC_GRV);
-          send_keyboard_report();
-        } else {
-          add_key(KC_ESC);
-          send_keyboard_report();
-        }
-      } else {
-        if (shift_esc_shift_mask) {
-          del_key(KC_GRV);
-          send_keyboard_report();
-        } else {
-          del_key(KC_ESC);
-          send_keyboard_report();
-        }
-      }
-      break;
-  }
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+    return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
 }
diff --git a/keyboards/phantom/keymaps/default/readme.md b/keyboards/phantom/keymaps/default/readme.md
new file mode 100644 (file)
index 0000000..f58f4f0
--- /dev/null
@@ -0,0 +1,45 @@
+# Keymap for a standard winkey ANSI configuration of the Phantom
+
+A basic keymap intended for a Phantom using the standard ANSI layout.
+
+See [keymap.c](keymap.c) for details.
+
+## Layers
+
+The keymap have two layers. To access the functions on the second layer, hold down `Fn` and press the corresponding key.
+
+### Layer 1: Default Layer
+     ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
+     |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
+     `---'   `---------------' `---------------' `---------------' `-----------'
+     ,-----------------------------------------------------------. ,-----------.
+     |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
+     |-----------------------------------------------------------| |-----------|
+     |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
+     |-----------------------------------------------------------| '-----------'
+     |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |
+     |-----------------------------------------------------------|     ,---.
+     |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |
+     |-----------------------------------------------------------| ,-----------.
+     |Ctl|Gui|Alt|             Space             |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig|
+     `-----------------------------------------------------------' `-----------'
+
+### Layer 2: Function Layer
+     ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
+     |   |   |   |   |   |   | |   |   |   |   | |Stp|Ply|Prv|Nxt| |Mut|Vo-|Vo+|
+     `---'   `---------------' `---------------' `---------------' `-----------'
+     ,-----------------------------------------------------------. ,-----------.
+     |   |   |   |   |   |   |   |   |   |   |   |   |   |       | |   |   |   |
+     |-----------------------------------------------------------| |-----------|
+     |     |   |   |   |   |   |   |   |   |   |   |   |   |     | |   |   |   |
+     |-----------------------------------------------------------| '-----------'
+     |      |   |   |   |   |   |   |   |   |   |   |   | Media  |
+     |-----------------------------------------------------------|     ,---.
+     |        |   |   |Cal|   |   |   |   |   |   |   |          |     |   |
+     |-----------------------------------------------------------| ,-----------.
+     |   |   |   |                               |   |   |   |   | |   |   |   |
+     `-----------------------------------------------------------' `-----------'
+
+## Building
+
+To build the firmware with the default keymap, run `make default`.
diff --git a/keyboards/phantom/keymaps/rgbmod/Makefile b/keyboards/phantom/keymaps/rgbmod/Makefile
new file mode 100644 (file)
index 0000000..38c23a1
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright 2013 Jun Wako <wakojun@gmail.com>
+#
+# 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/>.
+
+
+# QMK Build Options
+#   change to "no" to disable the options, or define them in the Makefile in
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = no         # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes       # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/phantom/keymaps/rgbmod/config.h b/keyboards/phantom/keymaps/rgbmod/config.h
new file mode 100644 (file)
index 0000000..a3828f7
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * 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/>.
+ */
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif
diff --git a/keyboards/phantom/keymaps/rgbmod/keymap.c b/keyboards/phantom/keymaps/rgbmod/keymap.c
new file mode 100644 (file)
index 0000000..baef27a
--- /dev/null
@@ -0,0 +1,77 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * 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 "phantom.h"
+
+// Helpful defines
+#define _______ KC_TRNS
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BL 0
+#define _FL 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [_BL] = KEYMAP(
+        KC_ESC,           KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,       KC_PSCR, KC_SLCK, KC_PAUS, \
+        KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSPC,      KC_INS,  KC_HOME, KC_PGUP, \
+        KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,      KC_DEL,  KC_END,  KC_PGDN, \
+        KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT,          KC_ENT,                                  \
+        KC_LSFT,          KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH,          KC_RSFT,               KC_UP,            \
+        KC_LCTL, KC_LGUI, KC_LALT,                            KC_SPC,                             KC_RALT, KC_RGUI, MO(_FL), KC_RCTL,      KC_LEFT, KC_DOWN, KC_RGHT  \
+    ),
+    [_FL] = KEYMAP(
+        _______,          _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,       _______, _______, _______, \
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,         _______, _______, _______, \
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,       _______, _______, _______, \
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP,            _______,                                  \
+        _______,          RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______,          _______,                _______,          \
+        _______, _______, _______,                            _______,                            _______, _______, _______, _______,       _______, _______, _______  \
+    ),
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+    // MACRODOWN only works in this function
+    switch(id) {
+        case 0:
+            if (record->event.pressed) {
+                register_code(KC_RSFT);
+            } else {
+                unregister_code(KC_RSFT);
+            }
+            break;
+    }
+    return MACRO_NONE;
+};
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+    return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/phantom/led.c b/keyboards/phantom/led.c
deleted file mode 100644 (file)
index 69dba7d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-
-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 <avr/io.h>
-#include "stdint.h"
-#include "led.h"
-
-void led_init_ports(void) {
-    // * Set our LED pins as output
-    DDRB |= (1<<6);
-       DDRB |= (1<<7);
-}
-
-void led_set_kb(uint8_t usb_led) {
-    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
-        // Turn capslock on
-        PORTB |= (1<<6);
-    } else {
-        // Turn capslock off
-        PORTB &= ~(1<<6);
-    }
-       if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
-        // Turn scrolllock on
-        PORTB |= (1<<7);
-    } else {
-        // Turn scrolllock off
-        PORTB &= ~(1<<7);
-    }
-}
index d53af491fe28cf5b801c6159d22e2afd73a17d89..2bf1631b9c3c66d98f2d010f27ba75b6e5958724 100644 (file)
@@ -1,9 +1,63 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * 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 "phantom.h"
-#include "led.h"
 
 void matrix_init_kb(void) {
-       // put your keyboard start-up code here
-       // runs once when the firmware starts up
-       matrix_init_user();
-       led_init_ports();
-};
+    // put your keyboard start-up code here
+    // runs once when the firmware starts up
+    led_init_ports();
+    matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+    // put your looping keyboard code here
+    // runs every cycle (a lot)
+
+    matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+    // put your per-action keyboard code here
+    // runs for every action, just before processing by the firmware
+
+    return process_record_user(keycode, record);
+}
+
+void led_init_ports(void) {
+    DDRB |= (1<<6) | (1<<7); // OUT
+}
+
+void led_set_kb(uint8_t usb_led) {
+    if (usb_led & (1<<USB_LED_CAPS_LOCK))
+    {
+        PORTB |= (1<<6); // HI
+    }
+    else
+    {
+        PORTB &= ~(1<<6); // LO
+    }
+
+    if (usb_led & (1<<USB_LED_SCROLL_LOCK))
+    {
+        PORTB |= (1<<7); // HI
+    }
+    else
+    {
+        PORTB &= ~(1<<7); // LO
+    }
+
+    led_set_user(usb_led);
+}
index 420826becf8e28113518eb383987f2e0f037b6d7..784fca21f1cb109cb080877feab7684a48a61e3f 100644 (file)
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * 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/>.
+ */
 #ifndef PHANTOM_H
 #define PHANTOM_H
 
 #include "quantum.h"
 
-/* Phantom matrix layout
-   * ,-----------------------------------------------------------------------------.
-   * |00   |02| 03| 04| 05|  | 06| 07| 08| 09|   | 0a|0b |0c |0d |     |0e  |0f  |0g  |
-   * |-----------------------------------------------------------|     |--------------|
-   * | 01| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b|  1d   |     |1e  |1f  |1g  |
-   * |-----------------------------------------------------------|     |--------------|
-   * |20   | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|   2d|     | 2e | 2f | 2g |
-   * |-----------------------------------------------------------|     `--------------'
-   * |30     | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d    |
-   * |-----------------------------------------------------------|              ,----.
-   * | 40     | 42| 43| 44| 45| 46| 47| 48| 49| 4a| 4b| 4d       |              | 4f |
-   * |-----------------------------------------------------------|      ,-------------.
-   * | 50 | 51 | 52 |      57               |5a  | 5b | 5c | 5d  |      | 5e| 5f | 5g |
-   * `-----------------------------------------------------------'      `-------------'
- */
-// The first section contains all of the arguments
-// The second converts the arguments into a two-dimensional array
-#define KEYMAP( \
-       k00, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \
-       k01, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e, k1f, k1g, \
-       k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
-       k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
-       k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4f, \
-       k50, k51, k52, k57, k5a, k5b, k5c, k5d, k5e, k5f, k5g  \
-) \
-{ \
-               {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g}, \
-               {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1d, k1e, k1f, k1g}, \
-               {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g}, \
-               {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3d, k3d, k3d, k3d}, \
-               {k40, k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4d, k4f, k4f, k4f},  \
-               {k50, k51, k52, k57, k57, k57, k57, k57, k57, k57, k5a, k5b, k5c, k5d, k5e, k5f, k5g} \
+// Keymap utilizing all the possible keys on the PCB.
+#define KEYMAP_7BIT( \
+    K00, K53, K02, K03, K04, K05, K56, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
+    K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,      K2E, K2F, K2G, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,      K3E, K3F, K3G, \
+    K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D,      K4E, K4F, K4G, \
+    K50, K51, K52, K54,      K55, K57, K58,           K5A, K5B, K5C, K5D,      K5E, K5F, K5G  \
+) { \
+/*          0      1      2      3      4      5      6      7      8      9      A      B      C      D      E      F      G    */  \
+/* 0 */   { K00,   K01,   K02,   K03,   K04,   K05,   K06,   K07,   K08,   K09,   K0A,   K0B,   K0C,   K0D,   K0E,   K0F,   K0G   }, \
+/* 1 */   { K10,   K11,   K12,   K13,   K14,   K15,   K16,   K17,   K18,   K19,   K1A,   K1B,   K1C,   K1D,   K1E,   K1F,   K1G   }, \
+/* 2 */   { K20,   K21,   K22,   K23,   K24,   K25,   K26,   K27,   K28,   K29,   K2A,   K2B,   K2C,   K2D,   K2E,   K2F,   K2G   }, \
+/* 3 */   { K30,   K31,   K32,   K33,   K34,   K35,   K36,   K37,   K38,   K39,   K3A,   K3B,   K3C,   K3D,   K3E,   K3F,   K3G   }, \
+/* 4 */   { K40,   K41,   K42,   K43,   K44,   K45,   K46,   K47,   K48,   K49,   K4A,   K4B,   K4C,   K4D,   K4E,   K4F,   K4G   }, \
+/* 5 */   { K50,   K51,   K52,   K53,   K54,   K55,   K56,   K57,   K58,   KC_NO, K5A,   K5B,   K5C,   K5D,   K5E,   K5F,   K5G   }  \
 }
 
+
+// Keymap for a standard ANSI layout.
+#define KEYMAP( \
+    K00,      K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,      K0E, K0F, K0G, \
+    K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D,      K1E, K1F, K1G, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,      K2E, K2F, K2G, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D,                     \
+    K40,      K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B,      K4D,           K4F,      \
+    K50, K51, K52,                K57,                K5A, K5B, K5C, K5D,      K5E, K5F, K5G  \
+) KEYMAP_7BIT( \
+    K00,   KC_NO, K02,   K03,   K04,   K05,   KC_NO, K06,   K07,   K08,   K09,   K0A,   K0B,   K0C,   K0D,   K0E,   K0F,   K0G,   \
+    K01,   K10,   K11,   K12,   K13,   K14,   K15,   K16,   K17,   K18,   K19,   K1A,   K1B,   KC_NO, K1D,   K1E,   K1F,   K1G,   \
+    K20,   K21,   K22,   K23,   K24,   K25,   K26,   K27,   K28,   K29,   K2A,   K2B,   K2C,   K2D,          K2E,   K2F,   K2G,   \
+    K30,   K31,   K32,   K33,   K34,   K35,   K36,   K37,   K38,   K39,   K3A,   K3B,   KC_NO, K3D,          KC_NO, KC_NO, KC_NO, \
+    K40,   KC_NO, K42,   K43,   K44,   K45,   K46,   K47,   K48,   K49,   K4A,   K4B,   KC_NO, K4D,          KC_NO, K4F,   KC_NO, \
+    K50,   K51,   K52,   KC_NO,        KC_NO, K57,   KC_NO,               K5A,   K5B,   K5C,   K5D,          K5E,   K5F,   K5G    \
+)
+
+#define KEYMAP_WINKEYLESS( \
+    K00,      K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,      K0E, K0F, K0G, \
+    K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D,      K1E, K1F, K1G, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,      K2E, K2F, K2G, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D,                     \
+    K40,      K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B,      K4D,           K4F,      \
+    K50, K51, K52,                K57,                     K5B, K5C, K5D,      K5E, K5F, K5G  \
+) KEYMAP_7BIT( \
+    K00,   KC_NO, K02,   K03,   K04,   K05,   KC_NO, K06,   K07,   K08,   K09,   K0A,   K0B,   K0C,   K0D,   K0E,   K0F,   K0G,   \
+    K01,   K10,   K11,   K12,   K13,   K14,   K15,   K16,   K17,   K18,   K19,   K1A,   K1B,   KC_NO, K1D,   K1E,   K1F,   K1G,   \
+    K20,   K21,   K22,   K23,   K24,   K25,   K26,   K27,   K28,   K29,   K2A,   K2B,   K2C,   K2D,          K2E,   K2F,   K2G,   \
+    K30,   K31,   K32,   K33,   K34,   K35,   K36,   K37,   K38,   K39,   K3A,   K3B,   KC_NO, K3D,          KC_NO, KC_NO, KC_NO, \
+    K40,   KC_NO, K42,   K43,   K44,   K45,   K46,   K47,   K48,   K49,   K4A,   K4B,   KC_NO, K4D,          KC_NO, K4F,   KC_NO, \
+    K50,   K51,   K52,   KC_NO,        KC_NO, K57,   KC_NO,               KC_NO, K5B,   K5C,   K5D,          K5E,   K5F,   K5G    \
+)
+
+#define KEYMAP_ISO( \
+    K00,      K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,      K0E, K0F, K0G, \
+    K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D,      K1E, K1F, K1G, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C,           K2E, K2F, K2G, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,                     \
+    K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B,      K4D,           K4F,      \
+    K50, K51, K52,                K57,                K5A, K5B, K5C, K5D,      K5E, K5F, K5G  \
+) KEYMAP_7BIT( \
+    K00,   KC_NO, K02,   K03,   K04,   K05,   KC_NO, K06,   K07,   K08,   K09,   K0A,   K0B,   K0C,   K0D,   K0E,   K0F,   K0G,   \
+    K01,   K10,   K11,   K12,   K13,   K14,   K15,   K16,   K17,   K18,   K19,   K1A,   K1B,   KC_NO, K1D,   K1E,   K1F,   K1G,   \
+    K20,   K21,   K22,   K23,   K24,   K25,   K26,   K27,   K28,   K29,   K2A,   K2B,   K2C,   KC_NO,        K2E,   K2F,   K2G,   \
+    K30,   K31,   K32,   K33,   K34,   K35,   K36,   K37,   K38,   K39,   K3A,   K3B,   K3C,   K3D,          KC_NO, KC_NO, KC_NO, \
+    K40,   K41,   K42,   K43,   K44,   K45,   K46,   K47,   K48,   K49,   K4A,   K4B,   KC_NO, K4D,          KC_NO, K4F,   KC_NO, \
+    K50,   K51,   K52,   KC_NO,        KC_NO, K57,   KC_NO,               K5A,   K5B,   K5C,   K5D,          K5E,   K5F,   K5G    \
+)
+
+#define KEYMAP_ISO_WINKEYLESS( \
+    K00,      K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,      K0E, K0F, K0G, \
+    K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D,      K1E, K1F, K1G, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C,           K2E, K2F, K2G, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,                     \
+    K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B,      K4D,           K4F,      \
+    K50, K51, K52,                K57,                     K5B, K5C, K5D,      K5E, K5F, K5G  \
+) KEYMAP_7BIT( \
+    K00,   KC_NO, K02,   K03,   K04,   K05,   KC_NO, K06,   K07,   K08,   K09,   K0A,   K0B,   K0C,   K0D,   K0E,   K0F,   K0G,   \
+    K01,   K10,   K11,   K12,   K13,   K14,   K15,   K16,   K17,   K18,   K19,   K1A,   K1B,   KC_NO, K1D,   K1E,   K1F,   K1G,   \
+    K20,   K21,   K22,   K23,   K24,   K25,   K26,   K27,   K28,   K29,   K2A,   K2B,   K2C,   KC_NO,        K2E,   K2F,   K2G,   \
+    K30,   K31,   K32,   K33,   K34,   K35,   K36,   K37,   K38,   K39,   K3A,   K3B,   K3C,   K3D,          KC_NO, KC_NO, KC_NO, \
+    K40,   K41,   K42,   K43,   K44,   K45,   K46,   K47,   K48,   K49,   K4A,   K4B,   KC_NO, K4D,          KC_NO, K4F,   KC_NO, \
+    K50,   K51,   K52,   KC_NO,        KC_NO, K57,   KC_NO,               KC_NO, K5B,   K5C,   K5D,          K5E,   K5F,   K5G    \
+)
+
 #endif
diff --git a/keyboards/phantom/pinout.txt b/keyboards/phantom/pinout.txt
deleted file mode 100644 (file)
index 415ad46..0000000
+++ /dev/null
@@ -1 +0,0 @@
-For WS2812B LED strip support, connect DIN from strip to PE2 on Teensy (see reference image https://i.imgur.com/aDfNoHT.jpg)
\ No newline at end of file
index 190f738faf9f354b262171883c497bb4061c2aee..614c21fda0fc205149835d4b3bff93fb2937da13 100644 (file)
@@ -1,4 +1,48 @@
 Phantom keyboard firmware
-======================
+=========================
 
-TODO: to be updated.
+A community-developed keyboard PCB designed to fit inside the case of a Filco Majestouch.
+
+See the [Deskthority wiki](https://deskthority.net/wiki/Phantom) for more information.
+
+## Bootloader
+
+The Phantom uses a [Teensy 2.0](https://www.pjrc.com/store/teensy.html) as a controller.
+
+The Teensy has a special bootloader that can be accessed by pressing the button on the Teensy PCB. It is also possible to use Boot Magic and Command to access the bootloader.
+
+To write the firmware to the Teensy use [Teensy loader](https://www.pjrc.com/teensy/loader.html).
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see the [documentation](https://docs.qmk.fm).
+
+## RGB underlight
+
+It is possible to connect a WS2812B LED strip to the Teensy for RGB underlight support.
+
+For this to work the DIN connection on the WS2812B strip should be soldered to PE2 on the Teensy (see reference image https://i.imgur.com/aDfNoHT.jpg).
+
+See [rgbmod](keymaps/rgbmod) for a keymap that utilizes the RGB underlight feature.
+
+## Building
+
+The Phantom allows for a huge amount of different layouts.
+
+Depending on which layout and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [keyboards/phantom](/keyboards/phantom) folder.
+
+### Custom keymaps
+
+To define your own keymap, copy one of the [existing keymap](keymaps) folders and give it the name of your keymap. Then check the [keymap documentation](https://docs.qmk.fm/Keymap.html) for details on how to modify the keymap.
+
+To make it easy to define keymaps for the most common layouts a few macros are provided.
+
+| Layout          | Macro                     |
+| --------------- | ------------------------- |
+| Winkey ANSI     | `KEYMAP()`                |
+| Winkeyless ANSI | `KEYMAP_WINKEYLESS()`     |
+| Winkey ISO      | `KEYMAP_ISO()`            |
+| Winkeyless ISO  | `KEYMAP_ISO_WINKEYLESS()` |
+| 7BIT            | `KEYMAP_7BIT()`           |
+
+To build the firmware with a custom keymap, run `make <keymap name>`
index c6b8ca6c3546dd3f739bc48851d896a2c120e8e0..c0759396136663a486bb8f1a36381f22e73b2308 100644 (file)
@@ -1,7 +1,3 @@
-
-
-SRC = led.c
-
 # MCU name
 #MCU = at90usb1287
 MCU = atmega32u4
@@ -53,17 +49,21 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
 
 
 # Build Options
-#   comment out to disable the options.
+#   change yes to no to disable
 #
-BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no  # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes  # Console for debug(+400)
-COMMAND_ENABLE ?= yes    # Commands for debug and configuration
-NKRO_ENABLE ?= yes             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-RGBLIGHT_ENABLE ?=yes   # Enable keyboard underlight functionality (+4870)
-BACKLIGHT_ENABLE ?= no  # Enable keyboard backlight functionality (+1150)
-MIDI_ENABLE ?= no              # MIDI controls
-AUDIO_ENABLE ?= no
-UNICODE_ENABLE ?= no           # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
+BOOTMAGIC_ENABLE ?= yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
+CONSOLE_ENABLE ?= no         # Console for debug(+400)
+COMMAND_ENABLE ?= yes        # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= yes           # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE ?= no        # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+MIDI_ENABLE ?= no            # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
+FAUXCLICKY_ENABLE ?= no      # Use buzzer to emulate clicky switches
index 2b7a091e370a203e3b915e802a644340b40b184d..27c9e7c942e9403d28419dd52c4d0fd36f936cf8 100644 (file)
@@ -1,5 +1,4 @@
 #include "s65_x.h"
-#include "action_layer.h"
 
 #define _BL 0
 #define _AL 1
@@ -23,10 +22,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
   /* 0: ANSI qwerty */
   [_BL] = ANSI_KEYMAP(
-        F(4),   KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
-        KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \
-        F(2),   KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,       KC_ENT,     KC_PGUP, \
-        KC_LSFT,     KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,    KC_RSFT, KC_UP, KC_PGDN, \
+        KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
+        KC_TAB,  KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \
+        F(2),    KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,       KC_ENT,     KC_PGUP, \
+        KC_LSFT,       KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,    KC_RSFT, KC_UP, KC_PGDN, \
         KC_LCTL, KC_LALT, KC_LGUI,            KC_SPC,            KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
 
 
@@ -94,74 +93,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
       KC_TRNS, KC_TRNS, KC_TRNS,               KC_TRNS,                KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
 };
 
-enum function_id {
-  SHIFT_ESC,
-};
 
 const uint16_t PROGMEM fn_actions[] = {
   [0] = ACTION_LAYER_MOMENTARY(_FL),       // Momentary Fn overlay
   [1] = ACTION_LAYER_TOGGLE(_AL),          // Toggle Arrow Layer overlay
   [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer
   [3] = ACTION_LAYER_TOGGLE(_UL),          // Toggle Underglow Layer overlay
-  [4] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void matrix_scan_user(void) {
-
-  // Would like to do something like this, that would be cool
-  // Turn off all the LEDs on except for the ones mapped on the UL layer, for example
-  /* uint32_t layer = layer_state; */
-  /* if (layer & (1<<1)) { */
-  /*   gh60_wasd_leds_on(); */
-  /* } else { */
-  /*   gh60_wasd_leds_off(); */
-  /* } */
-  /*  */
-  /* if (layer & (1<<2)) { */
-  /*   gh60_esc_led_on(); */
-  /* } else { */
-  /*   gh60_esc_led_off(); */
-  /* } */
 };
 
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
-  // MACRODOWN only works in this function
-  switch(id) {
-    case 0:
-      if (record->event.pressed) {
-        register_code(KC_RSFT);
-      } else {
-        unregister_code(KC_RSFT);
-      }
-      break;
-  }
-  return MACRO_NONE;
-};
-
-#define MODS_CTRL_MASK  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
-  switch (id) {
-    static uint8_t shift_esc_shift_mask;
-    // Shift + ESC = ~
-    case SHIFT_ESC:
-      shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
-      if (record->event.pressed) {
-        if (shift_esc_shift_mask) {
-          add_key(KC_GRV);
-          send_keyboard_report();
-        } else {
-          add_key(KC_ESC);
-          send_keyboard_report();
-        }
-      } else {
-        if (shift_esc_shift_mask) {
-          del_key(KC_GRV);
-          send_keyboard_report();
-        } else {
-          del_key(KC_ESC);
-          send_keyboard_report();
-        }
-      }
-      break;
-  }
-};
index 96e3bb8468f0fad2b2b0b1ba59aee1813194de8f..2be27b4637bd67380565d567474ebabd72811f40 100644 (file)
@@ -1,5 +1,4 @@
 #include "s65_x.h"
-#include "action_layer.h"
 
 #define _BL 0
 #define _AL 1
@@ -23,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
   /* 0: ISO qwerty */
   [_BL] = ISO_KEYMAP(
-        F(4),   KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,       KC_BSPC,  KC_DEL, \
+        KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,       KC_BSPC,  KC_DEL, \
         KC_TAB,  KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,                KC_END, \
         F(2),    KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_GRAVE,    KC_ENT, KC_PGUP, \
         KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,   KC_RSFT, KC_UP, KC_PGDN, \
@@ -95,74 +94,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 };
 
 
-enum function_id {
-  SHIFT_ESC,
-};
-
 const uint16_t PROGMEM fn_actions[] = {
   [0]  = ACTION_LAYER_MOMENTARY(_FL),       // Momentary Fn overlay
   [1]  = ACTION_LAYER_TOGGLE(_AL),          // Toggle Arrow Layer overlay
   [2]  = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer
   [3]  = ACTION_LAYER_TOGGLE(_UL),          // Toggle Underglow Layer overlay
-  [12] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void matrix_scan_user(void) {
-
-  // Would like to do something like this, that would be cool
-  // Turn off all the LEDs on except for the ones mapped on the UL layer, for example
-  /* uint32_t layer = layer_state; */
-  /* if (layer & (1<<1)) { */
-  /*   gh60_wasd_leds_on(); */
-  /* } else { */
-  /*   gh60_wasd_leds_off(); */
-  /* } */
-  /*  */
-  /* if (layer & (1<<2)) { */
-  /*   gh60_esc_led_on(); */
-  /* } else { */
-  /*   gh60_esc_led_off(); */
-  /* } */
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
-  // MACRODOWN only works in this function
-  switch(id) {
-    case 0:
-      if (record->event.pressed) {
-        register_code(KC_RSFT);
-      } else {
-        unregister_code(KC_RSFT);
-      }
-      break;
-  }
-  return MACRO_NONE;
 };
 
-#define MODS_CTRL_MASK  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
-  switch (id) {
-    static uint8_t shift_esc_shift_mask;
-    // Shift + ESC = ~
-    case SHIFT_ESC:
-      shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
-      if (record->event.pressed) {
-        if (shift_esc_shift_mask) {
-          add_key(KC_GRV);
-          send_keyboard_report();
-        } else {
-          add_key(KC_ESC);
-          send_keyboard_report();
-        }
-      } else {
-        if (shift_esc_shift_mask) {
-          del_key(KC_GRV);
-          send_keyboard_report();
-        } else {
-          del_key(KC_ESC);
-          send_keyboard_report();
-        }
-      }
-      break;
-  }
-};
index 823f6448ad945ce4443a9911d1047618a00d2b71..651f7441b20a2119aa5c11790a1dfb28995b5fe3 100644 (file)
@@ -1,5 +1,4 @@
 #include "s65_x.h"
-#include "action_layer.h"
 
 #define _BL 0
 #define _AL 1
@@ -23,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
   /* 0: ANSI qwerty */
   [_BL] = ANSI_KEYMAP(
-        F(4),   KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
+        KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
         KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \
         F(2),   KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,       KC_ENT,     KC_PGUP, \
         KC_LSPO,     KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,    KC_RSPC, KC_UP, KC_PGDN, \
@@ -94,74 +93,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
       KC_TRNS, KC_TRNS, KC_TRNS,               KC_TRNS,                KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
 };
 
-enum function_id {
-  SHIFT_ESC,
-};
-
 const uint16_t PROGMEM fn_actions[] = {
   [0] = ACTION_LAYER_MOMENTARY(_FL),       // Momentary Fn overlay
   [1] = ACTION_LAYER_TOGGLE(_AL),          // Toggle Arrow Layer overlay
   [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer
   [3] = ACTION_LAYER_TOGGLE(_UL),          // Toggle Underglow Layer overlay
-  [4] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void matrix_scan_user(void) {
-
-  // Would like to do something like this, that would be cool
-  // Turn off all the LEDs on except for the ones mapped on the UL layer, for example
-  /* uint32_t layer = layer_state; */
-  /* if (layer & (1<<1)) { */
-  /*   gh60_wasd_leds_on(); */
-  /* } else { */
-  /*   gh60_wasd_leds_off(); */
-  /* } */
-  /*  */
-  /* if (layer & (1<<2)) { */
-  /*   gh60_esc_led_on(); */
-  /* } else { */
-  /*   gh60_esc_led_off(); */
-  /* } */
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
-  // MACRODOWN only works in this function
-  switch(id) {
-    case 0:
-      if (record->event.pressed) {
-        register_code(KC_RSFT);
-      } else {
-        unregister_code(KC_RSFT);
-      }
-      break;
-  }
-  return MACRO_NONE;
 };
 
-#define MODS_CTRL_MASK  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
-  switch (id) {
-    static uint8_t shift_esc_shift_mask;
-    // Shift + ESC = ~
-    case SHIFT_ESC:
-      shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
-      if (record->event.pressed) {
-        if (shift_esc_shift_mask) {
-          add_key(KC_GRV);
-          send_keyboard_report();
-        } else {
-          add_key(KC_ESC);
-          send_keyboard_report();
-        }
-      } else {
-        if (shift_esc_shift_mask) {
-          del_key(KC_GRV);
-          send_keyboard_report();
-        } else {
-          del_key(KC_ESC);
-          send_keyboard_report();
-        }
-      }
-      break;
-  }
-};
index 4307f5f5931960b310a7d1d7db72f29fa2441929..c3b63e5eafdbb2948805db8d3af6477c3f55ae21 100644 (file)
@@ -1,5 +1,13 @@
 #include "xd60.h"
 
+
+extern inline void xd60_caps_led_on(void);
+extern inline void xd60_bl_led_on(void);
+
+extern inline void xd60_caps_led_off(void);
+extern inline void xd60_bl_led_off(void);
+
+
 void led_set_kb(uint8_t usb_led) {
        // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here