]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge https://github.com/qmk/qmk_firmware
authorFabian Topfstedt <topfstedt@schneevonmorgen.com>
Mon, 31 Jul 2017 19:17:16 +0000 (21:17 +0200)
committerFabian Topfstedt <topfstedt@schneevonmorgen.com>
Mon, 31 Jul 2017 19:17:16 +0000 (21:17 +0200)
61 files changed:
common_features.mk
docs/_summary.md
docs/stenography.md [new file with mode: 0644]
keyboards/deltasplit75/Makefile [new file with mode: 0644]
keyboards/deltasplit75/config.h [new file with mode: 0644]
keyboards/deltasplit75/deltasplit75.c [new file with mode: 0644]
keyboards/deltasplit75/deltasplit75.h [new file with mode: 0644]
keyboards/deltasplit75/eeprom-lefthand.eep [new file with mode: 0644]
keyboards/deltasplit75/eeprom-righthand.eep [new file with mode: 0644]
keyboards/deltasplit75/i2c.c [new file with mode: 0644]
keyboards/deltasplit75/i2c.h [new file with mode: 0644]
keyboards/deltasplit75/keymaps/default/config.h [new file with mode: 0644]
keyboards/deltasplit75/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/deltasplit75/keymaps/itsaferbie/Makefile [new file with mode: 0644]
keyboards/deltasplit75/keymaps/itsaferbie/config.h [new file with mode: 0644]
keyboards/deltasplit75/keymaps/itsaferbie/keymap.c [new file with mode: 0644]
keyboards/deltasplit75/keymaps/protosplit/config.h [new file with mode: 0644]
keyboards/deltasplit75/keymaps/protosplit/keymap.c [new file with mode: 0644]
keyboards/deltasplit75/matrix.c [new file with mode: 0644]
keyboards/deltasplit75/readme.md [new file with mode: 0644]
keyboards/deltasplit75/rules.mk [new file with mode: 0644]
keyboards/deltasplit75/serial.c [new file with mode: 0644]
keyboards/deltasplit75/serial.h [new file with mode: 0644]
keyboards/deltasplit75/split_util.c [new file with mode: 0644]
keyboards/deltasplit75/split_util.h [new file with mode: 0644]
keyboards/deltasplit75/v2/Makefile [new file with mode: 0644]
keyboards/deltasplit75/v2/config.h [new file with mode: 0644]
keyboards/deltasplit75/v2/rules.mk [new file with mode: 0644]
keyboards/deltasplit75/v2/v2.c [new file with mode: 0644]
keyboards/deltasplit75/v2/v2.h [new file with mode: 0644]
keyboards/ergodox/keymaps/french_hacker/keymap.c [new file with mode: 0644]
keyboards/ergodox/keymaps/french_hacker/readme.md [new file with mode: 0644]
keyboards/lets_split/matrix.c
keyboards/lets_split/split_util.c
keyboards/planck/keymaps/experimental/Makefile
keyboards/planck/keymaps/experimental/config.h
keyboards/planck/keymaps/experimental/keymap.c
keyboards/planck/keymaps/steno/Makefile [new file with mode: 0644]
keyboards/planck/keymaps/steno/config.h [new file with mode: 0644]
keyboards/planck/keymaps/steno/keymap.c [new file with mode: 0644]
keyboards/planck/keymaps/steno/readme.md [new file with mode: 0644]
keyboards/readme.md
keyboards/xd75/Makefile [new file with mode: 0644]
keyboards/xd75/config.h [new file with mode: 0644]
keyboards/xd75/keymaps/default/Makefile [new file with mode: 0644]
keyboards/xd75/keymaps/default/config.h [new file with mode: 0644]
keyboards/xd75/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/xd75/keymaps/default/readme.md [new file with mode: 0644]
keyboards/xd75/readme.md [new file with mode: 0644]
keyboards/xd75/rules.mk [new file with mode: 0644]
keyboards/xd75/xd75.c [new file with mode: 0644]
keyboards/xd75/xd75.h [new file with mode: 0644]
quantum/keymap_extras/keymap_steno.h [new file with mode: 0644]
quantum/process_keycode/process_steno.c [new file with mode: 0644]
quantum/process_keycode/process_steno.h [new file with mode: 0644]
quantum/quantum.c
quantum/quantum.h
quantum/quantum_keycodes.h
tmk_core/common/eeconfig.c
tmk_core/common/eeconfig.h
tmk_core/common/keyboard.c

index 5eb56ccbfc23078671f70ea536f326e2f93443e3..0adf81afac4d9dab8056cbd1788e1ab36b258187 100644 (file)
@@ -54,6 +54,12 @@ ifeq ($(strip $(COMBO_ENABLE)), yes)
     SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
 endif
 
+ifeq ($(strip $(STENO_ENABLE)), yes)
+    OPT_DEFS += -DSTENO_ENABLE
+       VIRTSER_ENABLE := yes
+       SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
+endif
+
 ifeq ($(strip $(VIRTSER_ENABLE)), yes)
     OPT_DEFS += -DVIRTSER_ENABLE
 endif
index 162cad78733f176dab6558c28cdb5bc34e018b73..723377de9824da567b29483c81cb48867d3f8a42 100644 (file)
@@ -1,4 +1,4 @@
-* [Getting started](README.md) 
+* [Getting started](README.md)
   * [QMK Overview](qmk_overview.md)
   * [Build Environment Setup](build_environment_setup.md)
     * [Vagrant Guide](vagrant_guide.md)
@@ -16,6 +16,7 @@
   * [Tap Dance](tap_dance.md)
   * [Mouse keys](mouse_keys.md)
   * [Unicode](unicode.md)
+  * [Stenography](stenography.md)
 
 * Reference
   * [Glossary](glossary.md)
@@ -27,7 +28,7 @@
   * [Customizing Functionality](custom_quantum_functions.md)
   * [Documentation Best Practices](documentation_best_practices.md)
   * [Unit Testing](unit_testing.md)
-  
+
 * For Makers and Modders
   * [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
   * [Adding features to QMK](adding_features_to_qmk.md)
@@ -39,7 +40,7 @@
 * For a Deeper Understanding
   * [How Keyboards Work](basic_how_keyboards_work.md)
   * [Understanding QMK](understanding_qmk.md)
-  
+
 * Other Topics
   * [General FAQ](faq.md)
   * [Using Eclipse with QMK](eclipse.md)
diff --git a/docs/stenography.md b/docs/stenography.md
new file mode 100644 (file)
index 0000000..fcac512
--- /dev/null
@@ -0,0 +1,108 @@
+# Stenography in QMK
+
+[Stenography](https://en.wikipedia.org/wiki/Stenotype) is a method of writing most often used by court reports, closed-captioning, and real-time transcription for the deaf. In stenography words are chorded syllable by syllable with a mixture of spelling, phonetic, and shortcut (briefs) strokes. Professional stenographers can reach 200-300 WPM without any of the strain usually found in standard typing and with far fewer errors (>99.9% accuracy).
+
+The [Open Steno Project](http://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports
+
+## Plover with QWERTY Keyboard
+
+Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar.
+
+To use Plover with QMK just enable NKRO and optionally adjust your layout if you have anything other than a standard layout. You may also want to purchase some steno-friendly keycaps to make it easier to hit multiple keys.
+
+## Plover with Steno Protocol
+
+Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiRP. An example layout can be found in `planck/keymaps/steno`.
+
+When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactive Plover.
+
+In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiRP; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart.
+
+> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time.
+
+### TX Bolt
+
+TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
+
+### GeminiRP
+
+GeminiRP encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiRP opens up many more options, including supporting non-English theories.
+
+## Configuring QMK for Steno
+
+Firstly, enable steno in your keymap's Makefile. You should also diable mousekeys to prevent conflicts.
+
+```Makefile
+STENO_ENABLE = yes
+MOUSEKEY_ENABLE = no
+```
+
+In your keymap create a new layer for Plover. You will need to include `keymap_steno.h`. See `planck/keymaps/steno/keymap.c` for an example. Remember to create a key to switch to the layer as well as a key for exiting the layer. If you would like to switch modes on the fly you can use the keycodes `QK_STENO_BOLT` and `QK_STENO_GEMINI`. If you only want to use one of the protocols you may set it up in your initialization function:
+
+```C
+void matrix_init_user() {
+  steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
+}
+```
+
+Once you have your keyboard flashed launch Plover. Click the 'Configure...' button. In the 'Machine' tab select the Stenotype Machine that corresponds to your desired protocol. Click the 'Configure...' button on this tab and enter the serial port or click 'Scan'. Baud rate is fine at 9600 (although you should be able to set as high as 115200 with no issues). Use the default settings for everything else (Data Bits: 8, Stop Bits: 1, Parity: N, no flow control).
+
+On the display tab click 'Open stroke display'. With Plover disabled you should be able to hit keys on your keyboard and see them show up in the stroke display window. Use this to make sure you have set up your keymap correctly. You are now ready to steno!
+
+## Learning Stenography
+
+* [Learn Plover!](https://sites.google.com/site/ploverdoc/)
+* [QWERTY Steno](http://qwertysteno.com/Home/)
+* [Steno Jig](https://joshuagrams.github.io/steno-jig/)
+* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
+
+## Keycode Reference
+
+As defined in `keymap_steno.h`.
+
+> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiRP keys to the nearest TX Bolt key so that one key map will work for both.
+
+|GeminiRP|TX Bolt|Steno Key|
+|--------|-------|-----------|
+|`STN_N1`|`STN_NUM`|Number bar #1|
+|`STN_N2`|`STN_NUM`|Number bar #2|
+|`STN_N3`|`STN_NUM`|Number bar #3|
+|`STN_N4`|`STN_NUM`|Number bar #4|
+|`STN_N5`|`STN_NUM`|Number bar #5|
+|`STN_N6`|`STN_NUM`|Number bar #6|
+|`STN_N7`|`STN_NUM`|Number bar #7|
+|`STN_N8`|`STN_NUM`|Number bar #8|
+|`STN_N9`|`STN_NUM`|Number bar #9|
+|`STN_NA`|`STN_NUM`|Number bar #A|
+|`STN_NB`|`STN_NUM`|Number bar #B|
+|`STN_NC`|`STN_NUM`|Number bar #C|
+|`STN_S1`|`STN_SL`| `S-` upper|
+|`STN_S2`|`STN_SL`| `S-` lower|
+|`STN_TL`|`STN_TL`| `T-`|
+|`STN_KL`|`STN_KL`| `K-`|
+|`STN_PL`|`STN_PL`| `P-`|
+|`STN_WL`|`STN_WL`| `W-`|
+|`STN_HL`|`STN_HL`| `H-`|
+|`STN_RL`|`STN_RL`| `R-`|
+|`STN_A`|`STN_A`| `A` vowel|
+|`STN_O`|`STN_O`| `O` vowel|
+|`STN_ST1`|`STN_STR`| `*` upper-left |
+|`STN_ST2`|`STN_STR`| `*` lower-left|
+|`STN_ST3`|`STN_STR`| `*` upper-right|
+|`STN_ST4`|`STN_STR`| `*` lower-right|
+|`STN_E`|`STN_E`| `E` vowel|
+|`STN_U`|`STN_U`| `U` vowel|
+|`STN_FR`|`STN_FR`| `-F`|
+|`STN_PR`|`STN_PR`| `-P`|
+|`STN_RR`|`STN_RR`| `-R`|
+|`STN_BR`|`STN_BR`| `-B`|
+|`STN_LR`|`STN_LR`| `-L`|
+|`STN_GR`|`STN_GR`| `-G`|
+|`STN_TR`|`STN_TR`| `-T`|
+|`STN_SR`|`STN_SR`| `-S`|
+|`STN_DR`|`STN_DR`| `-D`|
+|`STN_ZR`|`STN_ZR`| `-Z`|
+|`STN_FN`|| (GeminiRP only)|
+|`STN_RES1`||(GeminiRP only)|
+|`STN_RES2`||(GeminiRP only)|
+|`STN_PWR`||(GeminiRP only)|
diff --git a/keyboards/deltasplit75/Makefile b/keyboards/deltasplit75/Makefile
new file mode 100644 (file)
index 0000000..d1dec53
--- /dev/null
@@ -0,0 +1,5 @@
+SUBPROJECT_DEFAULT = v2
+
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
diff --git a/keyboards/deltasplit75/config.h b/keyboards/deltasplit75/config.h
new file mode 100644 (file)
index 0000000..89d328b
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+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/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+#ifdef SUBPROJECT_protosplit
+    #include "protosplit/config.h"
+#endif
+#ifdef SUBPROJECT_v2
+    #include "v2/config.h"
+#endif
+#endif
diff --git a/keyboards/deltasplit75/deltasplit75.c b/keyboards/deltasplit75/deltasplit75.c
new file mode 100644 (file)
index 0000000..6a73db4
--- /dev/null
@@ -0,0 +1 @@
+#include "deltasplit75.h"
\ No newline at end of file
diff --git a/keyboards/deltasplit75/deltasplit75.h b/keyboards/deltasplit75/deltasplit75.h
new file mode 100644 (file)
index 0000000..9db16c7
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef DELTASPLIT75_H
+#define DELTASPLIT75_H
+
+#ifdef SUBPROJECT_v2
+    #include "v2.h"
+#endif
+#ifdef SUBPROJECT_protosplit
+    #include "protosplit.h"
+#endif
+
+#include "quantum.h"
+
+#endif
\ No newline at end of file
diff --git a/keyboards/deltasplit75/eeprom-lefthand.eep b/keyboards/deltasplit75/eeprom-lefthand.eep
new file mode 100644 (file)
index 0000000..b9666a7
--- /dev/null
@@ -0,0 +1,2 @@
+:0B0000000000000000000000000001F4\r
+:00000001FF\r
diff --git a/keyboards/deltasplit75/eeprom-righthand.eep b/keyboards/deltasplit75/eeprom-righthand.eep
new file mode 100644 (file)
index 0000000..94cc5be
--- /dev/null
@@ -0,0 +1,2 @@
+:0B0000000000000000000000000000F5\r
+:00000001FF\r
diff --git a/keyboards/deltasplit75/i2c.c b/keyboards/deltasplit75/i2c.c
new file mode 100644 (file)
index 0000000..af806c7
--- /dev/null
@@ -0,0 +1,162 @@
+#include <util/twi.h>\r
+#include <avr/io.h>\r
+#include <stdlib.h>\r
+#include <avr/interrupt.h>\r
+#include <util/twi.h>\r
+#include <stdbool.h>\r
+#include "i2c.h"\r
+\r
+#ifdef USE_I2C\r
+\r
+// Limits the amount of we wait for any one i2c transaction.\r
+// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is\r
+// 9 bits, a single transaction will take around 90μs to complete.\r
+//\r
+// (F_CPU/SCL_CLOCK)  =>  # of Î¼C cycles to transfer a bit\r
+// poll loop takes at least 8 clock cycles to execute\r
+#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8\r
+\r
+#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)\r
+\r
+volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];\r
+\r
+static volatile uint8_t slave_buffer_pos;\r
+static volatile bool slave_has_register_set = false;\r
+\r
+// Wait for an i2c operation to finish\r
+inline static\r
+void i2c_delay(void) {\r
+  uint16_t lim = 0;\r
+  while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)\r
+    lim++;\r
+\r
+  // easier way, but will wait slightly longer\r
+  // _delay_us(100);\r
+}\r
+\r
+// Setup twi to run at 100kHz\r
+void i2c_master_init(void) {\r
+  // no prescaler\r
+  TWSR = 0;\r
+  // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.\r
+  // Check datasheets for more info.\r
+  TWBR = ((F_CPU/SCL_CLOCK)-16)/2;\r
+}\r
+\r
+// Start a transaction with the given i2c slave address. The direction of the\r
+// transfer is set with I2C_READ and I2C_WRITE.\r
+// returns: 0 => success\r
+//          1 => error\r
+uint8_t i2c_master_start(uint8_t address) {\r
+  TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);\r
+\r
+  i2c_delay();\r
+\r
+  // check that we started successfully\r
+  if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))\r
+    return 1;\r
+\r
+  TWDR = address;\r
+  TWCR = (1<<TWINT) | (1<<TWEN);\r
+\r
+  i2c_delay();\r
+\r
+  if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )\r
+    return 1; // slave did not acknowledge\r
+  else\r
+    return 0; // success\r
+}\r
+\r
+\r
+// Finish the i2c transaction.\r
+void i2c_master_stop(void) {\r
+  TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);\r
+\r
+  uint16_t lim = 0;\r
+  while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)\r
+    lim++;\r
+}\r
+\r
+// Write one byte to the i2c slave.\r
+// returns 0 => slave ACK\r
+//         1 => slave NACK\r
+uint8_t i2c_master_write(uint8_t data) {\r
+  TWDR = data;\r
+  TWCR = (1<<TWINT) | (1<<TWEN);\r
+\r
+  i2c_delay();\r
+\r
+  // check if the slave acknowledged us\r
+  return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;\r
+}\r
+\r
+// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,\r
+// if ack=0 the acknowledge bit is not set.\r
+// returns: byte read from i2c device\r
+uint8_t i2c_master_read(int ack) {\r
+  TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);\r
+\r
+  i2c_delay();\r
+  return TWDR;\r
+}\r
+\r
+void i2c_reset_state(void) {\r
+  TWCR = 0;\r
+}\r
+\r
+void i2c_slave_init(uint8_t address) {\r
+  TWAR = address << 0; // slave i2c address\r
+  // TWEN  - twi enable\r
+  // TWEA  - enable address acknowledgement\r
+  // TWINT - twi interrupt flag\r
+  // TWIE  - enable the twi interrupt\r
+  TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);\r
+}\r
+\r
+ISR(TWI_vect);\r
+\r
+ISR(TWI_vect) {\r
+  uint8_t ack = 1;\r
+  switch(TW_STATUS) {\r
+    case TW_SR_SLA_ACK:\r
+      // this device has been addressed as a slave receiver\r
+      slave_has_register_set = false;\r
+      break;\r
+\r
+    case TW_SR_DATA_ACK:\r
+      // this device has received data as a slave receiver\r
+      // The first byte that we receive in this transaction sets the location\r
+      // of the read/write location of the slaves memory that it exposes over\r
+      // i2c.  After that, bytes will be written at slave_buffer_pos, incrementing\r
+      // slave_buffer_pos after each write.\r
+      if(!slave_has_register_set) {\r
+        slave_buffer_pos = TWDR;\r
+        // don't acknowledge the master if this memory loctaion is out of bounds\r
+        if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {\r
+          ack = 0;\r
+          slave_buffer_pos = 0;\r
+        }\r
+        slave_has_register_set = true;\r
+      } else {\r
+        i2c_slave_buffer[slave_buffer_pos] = TWDR;\r
+        BUFFER_POS_INC();\r
+      }\r
+      break;\r
+\r
+    case TW_ST_SLA_ACK:\r
+    case TW_ST_DATA_ACK:\r
+      // master has addressed this device as a slave transmitter and is\r
+      // requesting data.\r
+      TWDR = i2c_slave_buffer[slave_buffer_pos];\r
+      BUFFER_POS_INC();\r
+      break;\r
+\r
+    case TW_BUS_ERROR: // something went wrong, reset twi state\r
+      TWCR = 0;\r
+    default:\r
+      break;\r
+  }\r
+  // Reset everything, so we are ready for the next TWI interrupt\r
+  TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);\r
+}\r
+#endif\r
diff --git a/keyboards/deltasplit75/i2c.h b/keyboards/deltasplit75/i2c.h
new file mode 100644 (file)
index 0000000..cc39108
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef I2C_H\r
+#define I2C_H\r
+\r
+#include <stdint.h>\r
+\r
+#ifndef F_CPU\r
+#define F_CPU 16000000UL\r
+#endif\r
+\r
+#define I2C_READ 1\r
+#define I2C_WRITE 0\r
+\r
+#define I2C_ACK 1\r
+#define I2C_NACK 0\r
+\r
+#define SLAVE_BUFFER_SIZE 0x10\r
+\r
+// i2c SCL clock frequency\r
+#define SCL_CLOCK  100000L\r
+\r
+extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];\r
+\r
+void i2c_master_init(void);\r
+uint8_t i2c_master_start(uint8_t address);\r
+void i2c_master_stop(void);\r
+uint8_t i2c_master_write(uint8_t data);\r
+uint8_t i2c_master_read(int);\r
+void i2c_reset_state(void);\r
+void i2c_slave_init(uint8_t address);\r
+\r
+#endif\r
diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h
new file mode 100644 (file)
index 0000000..c72c00e
--- /dev/null
@@ -0,0 +1,31 @@
+/*\r
+Copyright 2012 Jun Wako <wakojun@gmail.com>\r
+\r
+This program is free software: you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation, either version 2 of the License, or\r
+(at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+*/\r
+\r
+\r
+#define USE_SERIAL\r
+\r
+#define MASTER_LEFT\r
+// #define _MASTER_RIGHT\r
+// #define EE_HANDS\r
+\r
+\r
+#ifdef SUBPROJECT_v2\r
+    #include "../../v2/config.h"\r
+#endif\r
+#ifdef SUBPROJECT_protosplit\r
+    #include "../../protosplit/config.h"\r
+#endif\r
diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..e2657bf
--- /dev/null
@@ -0,0 +1,31 @@
+#include "deltasplit75.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// 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.
+
+// Fillers to make layering more clear
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 
+       KEYMAP_V2(
+               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_INS, KC_HOME, KC_PGUP, 
+               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_DEL, KC_END, KC_PGDN, 
+               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_BSPC, KC_SLCK, 
+               KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PAUS,  //modify KC_TRNS to enable ISO Support
+               KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR, //modify KC_TRNS to enable ISO Support
+               KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+       KEYMAP_V2(
+               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_BSLS, 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_VOLU, 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, 
+               M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, 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_VOLD, M(0), KC_PSCR, 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),
+
+};
\ No newline at end of file
diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/Makefile b/keyboards/deltasplit75/keymaps/itsaferbie/Makefile
new file mode 100644 (file)
index 0000000..bab3b4c
--- /dev/null
@@ -0,0 +1,7 @@
+RGBLIGHT_ENABLE = yes        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+AUDIO_ENABLE = no            # Audio disabled while using RGB underlight.
+EXTRAKEY_ENABLE = yes
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/config.h b/keyboards/deltasplit75/keymaps/itsaferbie/config.h
new file mode 100644 (file)
index 0000000..4fb2554
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+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/>.
+*/
+
+
+#define USE_SERIAL
+
+#define MASTER_LEFT
+// #define _MASTER_RIGHT
+// #define EE_HANDS
+
+
+#ifdef SUBPROJECT_v2
+    #include "../../v2/config.h"
+#endif
+#ifdef SUBPROJECT_protosplit
+    #include "../../protosplit/config.h"
+#endif
diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c
new file mode 100644 (file)
index 0000000..82c292f
--- /dev/null
@@ -0,0 +1,46 @@
+#include "deltasplit75.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// 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.
+
+// Fillers to make layering more clear
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 
+       /* Layer 0: Default Layer
+     *,-----------------------------------------------------------------------.
+     * |Esc| F1| F2| F3| F4| F5| F6|    F7| F8| F9| F10| F11| F12|Prnt|Ins|Del| 
+        * |----------------------------------------------------------------------|
+     * |  `|  1|  2|  3|  4|  5|  6|    7|  8|  9|  0|  -|  =| Backspace| Home|
+     * |----------------------------------------------------------------------|
+     * |Tab  |  Q|  W|  E|  R|  T|      Y|  U|  I|  O|  P|  [|  ]|  \|    PgUp|
+     * |----------------------------------------------------------------------|
+     * |Ctrl|  A|  S|  D|  F|  G|       H|  J|  K|  L|  ;|  '|Enter  |  PgDown|
+     * |----------------------------------------------------------------------|
+     * |Shif|   |  Z|  X|  C|  V|  B|   N|  M|  ,|  .|  /|Shift |      Up| End|
+     * |----------------------------------------------------------------------|
+     * |CapsLo|Gui |Alt |Sp |Mod |      Sp| Alt| Gui| Ctrl|    | Lef| Dow| Rig|
+     * `----------------------------------------------------------------------'
+     */
+       KEYMAP_V2(
+               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_INS,  KC_DEL, 
+               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_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace.
+               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_PGUP, 
+               KC_LCTL, KC_A,    KC_S,    KC_D,   KC_F,  KC_G,                     KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT, KC_TRNS,  KC_ENT,  KC_PGDN, // KC_TRNS is unneeded ISO enter key. 
+               KC_LSFT, KC_TRNS, KC_Z,    KC_X,   KC_C,  KC_V,   KC_B,             KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT,  KC_UP,   KC_END,  // KC_TRNS is uneeded ISO layout key.
+               KC_CAPS, KC_LGUI, KC_LALT,         KC_SPC, MO(1),                   KC_SPC,  KC_RALT, KC_RGUI, KC_RCTL,                   KC_LEFT,  KC_DOWN, KC_RGHT),
+
+       KEYMAP_V2(
+               RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, 
+               RGB_MOD, RGB_HUD, RGB_SAD, 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, 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_VOLU, 
+               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_MPLY, KC_VOLD, 
+               KC_TRNS, KC_TRNS, KC_TRNS,          KC_TRNS, KC_TRNS,               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,                   KC_MPRV, KC_STOP, KC_MNXT),
+
+};
\ No newline at end of file
diff --git a/keyboards/deltasplit75/keymaps/protosplit/config.h b/keyboards/deltasplit75/keymaps/protosplit/config.h
new file mode 100644 (file)
index 0000000..4fb2554
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+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/>.
+*/
+
+
+#define USE_SERIAL
+
+#define MASTER_LEFT
+// #define _MASTER_RIGHT
+// #define EE_HANDS
+
+
+#ifdef SUBPROJECT_v2
+    #include "../../v2/config.h"
+#endif
+#ifdef SUBPROJECT_protosplit
+    #include "../../protosplit/config.h"
+#endif
diff --git a/keyboards/deltasplit75/keymaps/protosplit/keymap.c b/keyboards/deltasplit75/keymaps/protosplit/keymap.c
new file mode 100644 (file)
index 0000000..d8db2b8
--- /dev/null
@@ -0,0 +1,32 @@
+#include "deltasplit75.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// 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.
+
+// Fillers to make layering more clear
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 
+       KEYMAP_PROTOSPLIT(
+               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_INS, KC_HOME, KC_PGUP, 
+               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_DEL, KC_END, KC_PGDN, 
+               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_BSPC, KC_SLCK, 
+               KC_LCTL, 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_PAUS,
+               KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR,
+               KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+       KEYMAP_PROTOSPLIT(
+               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_BSLS, 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_VOLU, 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, 
+               M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_VOLD, M(0), KC_PSCR, 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),
+               
+
+};
\ No newline at end of file
diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c
new file mode 100644 (file)
index 0000000..c3bb0b0
--- /dev/null
@@ -0,0 +1,318 @@
+/*\r
+Copyright 2012 Jun Wako <wakojun@gmail.com>\r
+\r
+This program is free software: you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation, either version 2 of the License, or\r
+(at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+*/\r
+\r
+/*\r
+ * scan matrix\r
+ */\r
+#include <stdint.h>\r
+#include <stdbool.h>\r
+#include <avr/io.h>\r
+#include <avr/wdt.h>\r
+#include <avr/interrupt.h>\r
+#include <util/delay.h>\r
+#include "print.h"\r
+#include "debug.h"\r
+#include "util.h"\r
+#include "matrix.h"\r
+#include "split_util.h"\r
+#include "pro_micro.h"\r
+#include "config.h"\r
+\r
+#ifdef USE_I2C\r
+#  include "i2c.h"\r
+#else // USE_SERIAL\r
+#  include "serial.h"\r
+#endif\r
+\r
+#ifndef DEBOUNCE\r
+#  define DEBOUNCE     5\r
+#endif\r
+\r
+#define ERROR_DISCONNECT_COUNT 5\r
+\r
+static uint8_t debouncing = DEBOUNCE;\r
+static const int ROWS_PER_HAND = MATRIX_ROWS/2;\r
+static uint8_t error_count = 0;\r
+\r
+static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;\r
+static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;\r
+\r
+/* matrix state(1:on, 0:off) */\r
+static matrix_row_t matrix[MATRIX_ROWS];\r
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];\r
+\r
+static matrix_row_t read_cols(void);\r
+static void init_cols(void);\r
+static void unselect_rows(void);\r
+static void select_row(uint8_t row);\r
+\r
+__attribute__ ((weak))\r
+void matrix_init_quantum(void) {\r
+    matrix_init_kb();\r
+}\r
+\r
+__attribute__ ((weak))\r
+void matrix_scan_quantum(void) {\r
+    matrix_scan_kb();\r
+}\r
+\r
+__attribute__ ((weak))\r
+void matrix_init_kb(void) {\r
+    matrix_init_user();\r
+}\r
+\r
+__attribute__ ((weak))\r
+void matrix_scan_kb(void) {\r
+    matrix_scan_user();\r
+}\r
+\r
+__attribute__ ((weak))\r
+void matrix_init_user(void) {\r
+}\r
+\r
+__attribute__ ((weak))\r
+void matrix_scan_user(void) {\r
+}\r
+\r
+inline\r
+uint8_t matrix_rows(void)\r
+{\r
+    return MATRIX_ROWS;\r
+}\r
+\r
+inline\r
+uint8_t matrix_cols(void)\r
+{\r
+    return MATRIX_COLS;\r
+}\r
+\r
+void matrix_init(void)\r
+{\r
+    debug_enable = true;\r
+    debug_matrix = true;\r
+    debug_mouse = true;\r
+    // initialize row and col\r
+    unselect_rows();\r
+    init_cols();\r
+\r
+    TX_RX_LED_INIT;\r
+\r
+    // initialize matrix state: all keys off\r
+    for (uint8_t i=0; i < MATRIX_ROWS; i++) {\r
+        matrix[i] = 0;\r
+        matrix_debouncing[i] = 0;\r
+    }\r
+\r
+    matrix_init_quantum();\r
+}\r
+\r
+uint8_t _matrix_scan(void)\r
+{\r
+    // Right hand is stored after the left in the matirx so, we need to offset it\r
+    int offset = isLeftHand ? 0 : (ROWS_PER_HAND);\r
+\r
+    for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {\r
+        select_row(i);\r
+        _delay_us(30);  // without this wait read unstable value.\r
+        matrix_row_t cols = read_cols();\r
+        if (matrix_debouncing[i+offset] != cols) {\r
+            matrix_debouncing[i+offset] = cols;\r
+            debouncing = DEBOUNCE;\r
+        }\r
+        unselect_rows();\r
+    }\r
+\r
+    if (debouncing) {\r
+        if (--debouncing) {\r
+            _delay_ms(1);\r
+        } else {\r
+            for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {\r
+                matrix[i+offset] = matrix_debouncing[i+offset];\r
+            }\r
+        }\r
+    }\r
+\r
+    return 1;\r
+}\r
+\r
+#ifdef USE_I2C\r
+\r
+// Get rows from other half over i2c\r
+int i2c_transaction(void) {\r
+    int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;\r
+\r
+    int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);\r
+    if (err) goto i2c_error;\r
+\r
+    // start of matrix stored at 0x00\r
+    err = i2c_master_write(0x00);\r
+    if (err) goto i2c_error;\r
+\r
+    // Start read\r
+    err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);\r
+    if (err) goto i2c_error;\r
+\r
+    if (!err) {\r
+        int i;\r
+        for (i = 0; i < ROWS_PER_HAND-1; ++i) {\r
+            matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);\r
+        }\r
+        matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);\r
+        i2c_master_stop();\r
+    } else {\r
+i2c_error: // the cable is disconnceted, or something else went wrong\r
+        i2c_reset_state();\r
+        return err;\r
+    }\r
+\r
+    return 0;\r
+}\r
+\r
+#else // USE_SERIAL\r
+\r
+int serial_transaction(void) {\r
+    int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;\r
+\r
+    if (serial_update_buffers()) {\r
+        return 1;\r
+    }\r
+\r
+    for (int i = 0; i < ROWS_PER_HAND; ++i) {\r
+        matrix[slaveOffset+i] = serial_slave_buffer[i];\r
+    }\r
+    return 0;\r
+}\r
+#endif\r
+\r
+uint8_t matrix_scan(void)\r
+{\r
+    int ret = _matrix_scan();\r
+\r
+\r
+\r
+#ifdef USE_I2C\r
+    if( i2c_transaction() ) {\r
+#else // USE_SERIAL\r
+    if( serial_transaction() ) {\r
+#endif\r
+        // turn on the indicator led when halves are disconnected\r
+        TXLED1;\r
+\r
+        error_count++;\r
+\r
+        if (error_count > ERROR_DISCONNECT_COUNT) {\r
+            // reset other half if disconnected\r
+            int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;\r
+            for (int i = 0; i < ROWS_PER_HAND; ++i) {\r
+                matrix[slaveOffset+i] = 0;\r
+            }\r
+        }\r
+    } else {\r
+        // turn off the indicator led on no error\r
+        TXLED0;\r
+        error_count = 0;\r
+    }\r
+\r
+    matrix_scan_quantum();\r
+\r
+    return ret;\r
+}\r
+\r
+void matrix_slave_scan(void) {\r
+    _matrix_scan();\r
+\r
+    int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2);\r
+\r
+#ifdef USE_I2C\r
+    for (int i = 0; i < ROWS_PER_HAND; ++i) {\r
+        /* i2c_slave_buffer[i] = matrix[offset+i]; */\r
+        i2c_slave_buffer[i] = matrix[offset+i];\r
+    }\r
+#else // USE_SERIAL\r
+    for (int i = 0; i < ROWS_PER_HAND; ++i) {\r
+        serial_slave_buffer[i] = matrix[offset+i];\r
+    }\r
+#endif\r
+}\r
+\r
+bool matrix_is_modified(void)\r
+{\r
+    if (debouncing) return false;\r
+    return true;\r
+}\r
+\r
+inline\r
+bool matrix_is_on(uint8_t row, uint8_t col)\r
+{\r
+    return (matrix[row] & ((matrix_row_t)1<<col));\r
+}\r
+\r
+inline\r
+matrix_row_t matrix_get_row(uint8_t row)\r
+{\r
+    return matrix[row];\r
+}\r
+\r
+void matrix_print(void)\r
+{\r
+    print("\nr/c 0123456789ABCDEF\n");\r
+    for (uint8_t row = 0; row < MATRIX_ROWS; row++) {\r
+        phex(row); print(": ");\r
+        pbin_reverse16(matrix_get_row(row));\r
+        print("\n");\r
+    }\r
+}\r
+\r
+uint8_t matrix_key_count(void)\r
+{\r
+    uint8_t count = 0;\r
+    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {\r
+        count += bitpop16(matrix[i]);\r
+    }\r
+    return count;\r
+}\r
+\r
+static void  init_cols(void)\r
+{\r
+    for(int x = 0; x < MATRIX_COLS; x++) {\r
+        _SFR_IO8((col_pins[x] >> 4) + 1) &=  ~_BV(col_pins[x] & 0xF);\r
+        _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);\r
+    }\r
+}\r
+\r
+static matrix_row_t read_cols(void)\r
+{\r
+    matrix_row_t result = 0;\r
+    for(int x = 0; x < MATRIX_COLS; x++) {\r
+        result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);\r
+    }\r
+    return result;\r
+}\r
+\r
+static void unselect_rows(void)\r
+{\r
+    for(int x = 0; x < ROWS_PER_HAND; x++) {\r
+        _SFR_IO8((row_pins[x] >> 4) + 1) &=  ~_BV(row_pins[x] & 0xF);\r
+        _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);\r
+    }\r
+}\r
+\r
+static void select_row(uint8_t row)\r
+{\r
+    _SFR_IO8((row_pins[row] >> 4) + 1) |=  _BV(row_pins[row] & 0xF);\r
+    _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);\r
+}\r
diff --git a/keyboards/deltasplit75/readme.md b/keyboards/deltasplit75/readme.md
new file mode 100644 (file)
index 0000000..04ed35c
--- /dev/null
@@ -0,0 +1,137 @@
+DeltaSplit75
+======
+
+This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ and https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split
+
+Credit to ahtn and wootpatoot for work on the split keyboard firmware
+
+Split keyboard firmware for Arduino Pro Micro or other ATmega32u4
+based boards.
+
+## Case Files
+Files are available here: https://github.com/xyxjj/DeltaSplit75-Case-files
+
+## Build Guide
+The build guide should be found at https://qmk.fm/deltasplit75
+
+
+## First Time Setup
+
+Download or clone the whole firmware and navigate to the keyboards/deltasplit75 directory. Once your dev env is setup, you'll be able to generate the .hex using:
+
+```
+make v2
+
+or
+
+make v2-YOUR_KEYMAP_NAME (if you make a folder for your keymap)
+
+or
+
+make protosplit (if you have one of the prototype PCBs)
+```
+
+You will see a lot of output and if everything worked correctly you will see the built hex files:
+
+```
+deltasplit75_v2_protosplit.hex 
+
+or
+
+deltasplit74_v2_YOUR_KEYMAP_NAME.hex
+
+or
+
+deltasplit75_v2_default.hex
+
+```
+
+
+For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
+
+### DeltaSplit75 V2
+The PCBs available in groupbuy are all v2, if you've bought one of my prototype PCBs (it says DeltaSplit65 on the silkscreen instead of 75), use the code make protosplit instead
+
+Features
+--------
+
+For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
+
+Some features supported by the firmware:
+
+* Either half can connect to the computer via USB, or both halves can be used
+  independently.
+* 75% formfactor
+* Support for multiple Bottom Rows
+* RGB underglow support
+* Split Backspace and ISO support
+
+
+Flashing
+-------
+I personally use xLoader to upload my hex files to the keyboard, though any other working software is fine too
+
+
+Choosing which board to plug the USB cable into (choosing Master)
+--------
+Because the two boards are identical, the firmware has logic to differentiate the left and right board.
+
+It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable.
+
+The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side.
+
+The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
+
+### Setting the left hand as master
+If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
+
+### Setting the right hand as master
+If you always plug the usb cable into the right board, add an extra flag to your `config.h`
+```
+ #define MASTER_RIGHT
+```
+
+### Setting EE_hands to use either hands as master
+If you define `EE_HANDS` in your `config.h`, you will need to set the
+EEPROM for the left and right halves.
+
+The EEPROM is used to store whether the
+half is left handed or right handed. This makes it so that the same firmware
+file will run on both hands instead of having to flash left and right handed
+versions of the firmware to each half. To flash the EEPROM file for the left
+half run:
+```
+avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
+// or the equivalent in dfu-programmer
+
+```
+and similarly for right half
+```
+avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
+// or the equivalent in dfu-programmer
+```
+
+NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
+
+After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
+
+Note that you need to program both halves, but you have the option of using
+different keymaps for each half. You could program the left half with a QWERTY
+layout and the right half with a Colemak layout using bootmagic's default layout option.
+Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
+right half is connected.
+
+
+Notes on Using Pro Micro 3.3V
+-----------------------------
+
+Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
+the frequency on the 3.3V board.
+
+Also, if the slave board is producing weird characters in certain columns,
+update the following line in `matrix.c` to the following:
+
+```
+// _delay_us(30);  // without this wait read unstable value.
+_delay_us(300);  // without this wait read unstable value.
+```
diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk
new file mode 100644 (file)
index 0000000..0efa785
--- /dev/null
@@ -0,0 +1,87 @@
+SRC += matrix.c \
+          i2c.c \
+          split_util.c \
+          serial.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# 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 ?= no       # 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 ?= no            # 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 controls
+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.
+SUBPROJECT_rev1 ?= yes
+USE_I2C ?= yes
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no    # Breathing sleep LED during USB suspend
+
+CUSTOM_MATRIX = yes
+
+avrdude: build
+       ls /dev/tty* > /tmp/1; \
+       echo "Reset your Pro Micro now"; \
+       while [[ -z $$USB ]]; do \
+         sleep 1; \
+         ls /dev/tty* > /tmp/2; \
+         USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+       done; \
+       avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+.PHONY: avrdude
diff --git a/keyboards/deltasplit75/serial.c b/keyboards/deltasplit75/serial.c
new file mode 100644 (file)
index 0000000..898ef7d
--- /dev/null
@@ -0,0 +1,228 @@
+/*\r
+ * WARNING: be careful changing this code, it is very timing dependent\r
+ */\r
+\r
+#ifndef F_CPU\r
+#define F_CPU 16000000\r
+#endif\r
+\r
+#include <avr/io.h>\r
+#include <avr/interrupt.h>\r
+#include <util/delay.h>\r
+#include <stdbool.h>\r
+#include "serial.h"\r
+\r
+#ifdef USE_SERIAL\r
+\r
+// Serial pulse period in microseconds. Its probably a bad idea to lower this\r
+// value.\r
+#define SERIAL_DELAY 24\r
+\r
+uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};\r
+uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};\r
+\r
+#define SLAVE_DATA_CORRUPT (1<<0)\r
+volatile uint8_t status = 0;\r
+\r
+inline static\r
+void serial_delay(void) {\r
+  _delay_us(SERIAL_DELAY);\r
+}\r
+\r
+inline static\r
+void serial_output(void) {\r
+  SERIAL_PIN_DDR |= SERIAL_PIN_MASK;\r
+}\r
+\r
+// make the serial pin an input with pull-up resistor\r
+inline static\r
+void serial_input(void) {\r
+  SERIAL_PIN_DDR  &= ~SERIAL_PIN_MASK;\r
+  SERIAL_PIN_PORT |= SERIAL_PIN_MASK;\r
+}\r
+\r
+inline static\r
+uint8_t serial_read_pin(void) {\r
+  return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);\r
+}\r
+\r
+inline static\r
+void serial_low(void) {\r
+  SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;\r
+}\r
+\r
+inline static\r
+void serial_high(void) {\r
+  SERIAL_PIN_PORT |= SERIAL_PIN_MASK;\r
+}\r
+\r
+void serial_master_init(void) {\r
+  serial_output();\r
+  serial_high();\r
+}\r
+\r
+void serial_slave_init(void) {\r
+  serial_input();\r
+\r
+  // Enable INT0\r
+  EIMSK |= _BV(INT0);\r
+  // Trigger on falling edge of INT0\r
+  EICRA &= ~(_BV(ISC00) | _BV(ISC01));\r
+}\r
+\r
+// Used by the master to synchronize timing with the slave.\r
+static\r
+void sync_recv(void) {\r
+  serial_input();\r
+  // This shouldn't hang if the slave disconnects because the\r
+  // serial line will float to high if the slave does disconnect.\r
+  while (!serial_read_pin());\r
+  serial_delay();\r
+}\r
+\r
+// Used by the slave to send a synchronization signal to the master.\r
+static\r
+void sync_send(void) {\r
+  serial_output();\r
+\r
+  serial_low();\r
+  serial_delay();\r
+\r
+  serial_high();\r
+}\r
+\r
+// Reads a byte from the serial line\r
+static\r
+uint8_t serial_read_byte(void) {\r
+  uint8_t byte = 0;\r
+  serial_input();\r
+  for ( uint8_t i = 0; i < 8; ++i) {\r
+    byte = (byte << 1) | serial_read_pin();\r
+    serial_delay();\r
+    _delay_us(1);\r
+  }\r
+\r
+  return byte;\r
+}\r
+\r
+// Sends a byte with MSB ordering\r
+static\r
+void serial_write_byte(uint8_t data) {\r
+  uint8_t b = 8;\r
+  serial_output();\r
+  while( b-- ) {\r
+    if(data & (1 << b)) {\r
+      serial_high();\r
+    } else {\r
+      serial_low();\r
+    }\r
+    serial_delay();\r
+  }\r
+}\r
+\r
+// interrupt handle to be used by the slave device\r
+ISR(SERIAL_PIN_INTERRUPT) {\r
+  sync_send();\r
+\r
+  uint8_t checksum = 0;\r
+  for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {\r
+    serial_write_byte(serial_slave_buffer[i]);\r
+    sync_send();\r
+    checksum += serial_slave_buffer[i];\r
+  }\r
+  serial_write_byte(checksum);\r
+  sync_send();\r
+\r
+  // wait for the sync to finish sending\r
+  serial_delay();\r
+\r
+  // read the middle of pulses\r
+  _delay_us(SERIAL_DELAY/2);\r
+\r
+  uint8_t checksum_computed = 0;\r
+  for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {\r
+    serial_master_buffer[i] = serial_read_byte();\r
+    sync_send();\r
+    checksum_computed += serial_master_buffer[i];\r
+  }\r
+  uint8_t checksum_received = serial_read_byte();\r
+  sync_send();\r
+\r
+  serial_input(); // end transaction\r
+\r
+  if ( checksum_computed != checksum_received ) {\r
+    status |= SLAVE_DATA_CORRUPT;\r
+  } else {\r
+    status &= ~SLAVE_DATA_CORRUPT;\r
+  }\r
+}\r
+\r
+inline\r
+bool serial_slave_DATA_CORRUPT(void) {\r
+  return status & SLAVE_DATA_CORRUPT;\r
+}\r
+\r
+// Copies the serial_slave_buffer to the master and sends the\r
+// serial_master_buffer to the slave.\r
+//\r
+// Returns:\r
+// 0 => no error\r
+// 1 => slave did not respond\r
+int serial_update_buffers(void) {\r
+  // this code is very time dependent, so we need to disable interrupts\r
+  cli();\r
+\r
+  // signal to the slave that we want to start a transaction\r
+  serial_output();\r
+  serial_low();\r
+  _delay_us(1);\r
+\r
+  // wait for the slaves response\r
+  serial_input();\r
+  serial_high();\r
+  _delay_us(SERIAL_DELAY);\r
+\r
+  // check if the slave is present\r
+  if (serial_read_pin()) {\r
+    // slave failed to pull the line low, assume not present\r
+    sei();\r
+    return 1;\r
+  }\r
+\r
+  // if the slave is present syncronize with it\r
+  sync_recv();\r
+\r
+  uint8_t checksum_computed = 0;\r
+  // receive data from the slave\r
+  for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {\r
+    serial_slave_buffer[i] = serial_read_byte();\r
+    sync_recv();\r
+    checksum_computed += serial_slave_buffer[i];\r
+  }\r
+  uint8_t checksum_received = serial_read_byte();\r
+  sync_recv();\r
+\r
+  if (checksum_computed != checksum_received) {\r
+    sei();\r
+    return 1;\r
+  }\r
+\r
+  uint8_t checksum = 0;\r
+  // send data to the slave\r
+  for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {\r
+    serial_write_byte(serial_master_buffer[i]);\r
+    sync_recv();\r
+    checksum += serial_master_buffer[i];\r
+  }\r
+  serial_write_byte(checksum);\r
+  sync_recv();\r
+\r
+  // always, release the line when not in use\r
+  serial_output();\r
+  serial_high();\r
+\r
+  sei();\r
+  return 0;\r
+}\r
+\r
+#endif\r
diff --git a/keyboards/deltasplit75/serial.h b/keyboards/deltasplit75/serial.h
new file mode 100644 (file)
index 0000000..ab2ea0a
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef MY_SERIAL_H\r
+#define MY_SERIAL_H\r
+\r
+#include "config.h"\r
+#include <stdbool.h>\r
+\r
+/* TODO:  some defines for interrupt setup */\r
+#define SERIAL_PIN_DDR DDRD\r
+#define SERIAL_PIN_PORT PORTD\r
+#define SERIAL_PIN_INPUT PIND\r
+#define SERIAL_PIN_MASK _BV(PD0)\r
+#define SERIAL_PIN_INTERRUPT INT0_vect\r
+\r
+#define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_COLS+7)/8 *MATRIX_ROWS/2)\r
+#define SERIAL_MASTER_BUFFER_LENGTH 1\r
+\r
+// Buffers for master - slave communication\r
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];\r
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];\r
+\r
+void serial_master_init(void);\r
+void serial_slave_init(void);\r
+int serial_update_buffers(void);\r
+bool serial_slave_data_corrupt(void);\r
+\r
+#endif\r
diff --git a/keyboards/deltasplit75/split_util.c b/keyboards/deltasplit75/split_util.c
new file mode 100644 (file)
index 0000000..a636f60
--- /dev/null
@@ -0,0 +1,81 @@
+#include <avr/io.h>\r
+#include <avr/wdt.h>\r
+#include <avr/power.h>\r
+#include <avr/interrupt.h>\r
+#include <util/delay.h>\r
+#include <avr/eeprom.h>\r
+#include "split_util.h"\r
+#include "matrix.h"\r
+#include "keyboard.h"\r
+#include "config.h"\r
+\r
+#ifdef USE_I2C\r
+#  include "i2c.h"\r
+#else\r
+#  include "serial.h"\r
+#endif\r
+\r
+volatile bool isLeftHand = true;\r
+\r
+static void setup_handedness(void) {\r
+  #ifdef EE_HANDS\r
+    isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);\r
+  #else\r
+    // I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c\r
+    #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)\r
+      isLeftHand = !has_usb();\r
+    #else\r
+      isLeftHand = has_usb();\r
+    #endif\r
+  #endif\r
+}\r
+\r
+static void keyboard_master_setup(void) {\r
+#ifdef USE_I2C\r
+    i2c_master_init();\r
+#else\r
+    serial_master_init();\r
+#endif\r
+}\r
+\r
+static void keyboard_slave_setup(void) {\r
+#ifdef USE_I2C\r
+    i2c_slave_init(SLAVE_I2C_ADDRESS);\r
+#else\r
+    serial_slave_init();\r
+#endif\r
+}\r
+\r
+bool has_usb(void) {\r
+   USBCON |= (1 << OTGPADE); //enables VBUS pad\r
+   _delay_us(5);\r
+   return (USBSTA & (1<<VBUS));  //checks state of VBUS\r
+}\r
+\r
+void split_keyboard_setup(void) {\r
+   setup_handedness();\r
+\r
+   if (has_usb()) {\r
+      keyboard_master_setup();\r
+   } else {\r
+      keyboard_slave_setup();\r
+   }\r
+   sei();\r
+}\r
+\r
+void keyboard_slave_loop(void) {\r
+   matrix_init();\r
+\r
+   while (1) {\r
+      matrix_slave_scan();\r
+   }\r
+}\r
+\r
+// this code runs before the usb and keyboard is initialized\r
+void matrix_setup(void) {\r
+    split_keyboard_setup();\r
+\r
+    if (!has_usb()) {\r
+        keyboard_slave_loop();\r
+    }\r
+}\r
diff --git a/keyboards/deltasplit75/split_util.h b/keyboards/deltasplit75/split_util.h
new file mode 100644 (file)
index 0000000..a1b0447
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef SPLIT_KEYBOARD_UTIL_H\r
+#define SPLIT_KEYBOARD_UTIL_H\r
+\r
+#include <stdbool.h>\r
+\r
+#ifdef EE_HANDS\r
+       #define EECONFIG_BOOTMAGIC_END      (uint8_t *)10\r
+       #define EECONFIG_HANDEDNESS         EECONFIG_BOOTMAGIC_END\r
+#endif\r
+\r
+#define SLAVE_I2C_ADDRESS           0x32\r
+\r
+extern volatile bool isLeftHand;\r
+\r
+// slave version of matix scan, defined in matrix.c\r
+void matrix_slave_scan(void);\r
+\r
+void split_keyboard_setup(void);\r
+bool has_usb(void);\r
+void keyboard_slave_loop(void);\r
+\r
+#endif\r
diff --git a/keyboards/deltasplit75/v2/Makefile b/keyboards/deltasplit75/v2/Makefile
new file mode 100644 (file)
index 0000000..4e2a6f0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h
new file mode 100644 (file)
index 0000000..0f4b806
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+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/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEED
+#define PRODUCT_ID      0x3060
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    xyxjj
+#define PRODUCT         DeltaSplit75
+#define DESCRIPTION     75% split keyboard
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 14
+#define MATRIX_COLS 8
+
+// wiring of each half
+#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 }
+#define MATRIX_COL_PINS { B6, B5, B4, E6, D7, C6, D4, D1}
+
+#define CATERINA_BOOTLOADER
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 12    // Number of LEDs
+#define ws2812_PORTREG  PORTD
+#define ws2812_DDRREG   DDRD
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+
+#endif
\ No newline at end of file
diff --git a/keyboards/deltasplit75/v2/rules.mk b/keyboards/deltasplit75/v2/rules.mk
new file mode 100644 (file)
index 0000000..80a942d
--- /dev/null
@@ -0,0 +1,5 @@
+BACKLIGHT_ENABLE = no
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
diff --git a/keyboards/deltasplit75/v2/v2.c b/keyboards/deltasplit75/v2/v2.c
new file mode 100644 (file)
index 0000000..a7ee1fa
--- /dev/null
@@ -0,0 +1,14 @@
+#include "deltasplit75.h"
+
+void matrix_init_kb(void) {
+    // // green led on
+    // DDRD |= (1<<5);
+    // PORTD &= ~(1<<5);
+
+    // // orange led on
+    // DDRB |= (1<<0);
+    // PORTB &= ~(1<<0);
+
+       matrix_init_user();
+};
+
diff --git a/keyboards/deltasplit75/v2/v2.h b/keyboards/deltasplit75/v2/v2.h
new file mode 100644 (file)
index 0000000..985a8b2
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef V2_H
+#define V2_H
+
+#include "deltasplit75.h"
+
+//void promicro_bootloader_jmp(bool program);
+#include "quantum.h"
+
+//void promicro_bootloader_jmp(bool program);
+//matrix is defined in a weird way here; the layout on both sides are asymmetrical, but the "matrix" is symmetrical but with empty gaps
+//the last column is defined as a separate row because the firmware currently doesnt support more than 8 columns (this layout has 9 columns per side) K45 and K110 are the Bs on both sides; K53 and K106 are extra keys for ISO
+#define KEYMAP_V2( \
+       K00,   K01,   K02,   K03,   K04,   K05,   K06,       K70,   K71,   K72,   K73,   K74,   K75,   K76,   K77,   K132, \
+       K10,   K11,   K12,   K13,   K14,   K15,   K16,       K80,   K81,   K82,   K83,   K84,   K85,   K86,   K87,   K133, \
+       K20,   K21,   K22,   K23,   K24,   K25,              K90,   K91,   K92,   K93,   K94,   K95,   K96,   K97,   K134, \
+       K30,   K31,   K32,   K33,   K34,   K35,              K100,  K101,  K102,  K103,  K104,  K105,  K106,  K107,  K135, \
+       K40,   K53,   K41,   K42,   K43,   K44,   K45,              K110,  K111,  K112,  K113,  K114,  K115,  K116,  K117,  K136, \
+       K50,   K51,   K52,          K54,   K55,              K120,  K121,  K122,  K123,                K126,  K127,  K137 \
+       ) \
+       { \
+               { K00,   K01,   K02,   K03,   K04,   K05,   K06,   KC_NO}, \
+               { K10,   K11,   K12,   K13,   K14,   K15,   K16,   KC_NO}, \
+               { K20,   K21,   K22,   K23,   K24,   K25,   KC_NO, KC_NO}, \
+               { K30,   K31,   K32,   K33,   K34,   K35,   KC_NO, KC_NO}, \
+               { K40,   K41,   K42,   K43,   K44,   K45,   KC_NO, KC_NO}, \
+               { K50,   K51,   K52,   K53,   K54,   K55,   KC_NO, KC_NO}, \
+               { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \
+               { K70  , K71,   K72,   K73,   K74,   K75,   K76,   K77}, \
+               { K80,   K81,   K82,   K83,   K84,   K85,   K86,   K87}, \
+               { K90,   K91,   K92,   K93,   K94,   K95,   K96,   K97}, \
+               { K100,  K101,  K102,  K103,  K104,  K105,  K106, K107}, \
+               { K110,  K111,  K112,  K113,  K114,  K115,  K116,  K117}, \
+               { K120,  K121,  K122,  K123,  KC_NO, KC_NO, K126,  K127}, \
+               { KC_NO, KC_NO, K132,  K133,  K134,  K135,  K136,  K137} \
+       }
+
+#define KEYMAP_PROTOSPLIT( \
+       K00,   K01,   K02,   K03,   K04,   K05,   K06,       K70,   K71,   K72,   K73,   K74,   K75,   K76,   K77,   K132, \
+       K10,   K11,   K12,   K13,   K14,   K15,   K16,       K80,   K81,   K82,   K83,   K84,   K85,   K86,   K87,   K133, \
+       K20,   K21,   K22,   K23,   K24,   K25,              K90,   K91,   K92,   K93,   K94,   K95,   K96,   K97,   K134, \
+       K30,   K31,   K32,   K33,   K34,   K35,              K100,  K101,  K102,  K103,  K104,  K105,         K107,  K135, \
+       K40,   K41,   K42,   K43,   K44,   K45,              K110,  K111,  K112,  K113,  K114,  K115,  K116,  K117,  K136, \
+       K50,   K51,   K52,          K54,   K55,              K120,  K121,  K122,  K123,                K126,  K127,  K137 \
+       ) \
+       { \
+               { K00,   K01,   K02,   K03,   K04,   K05,   K06,   KC_NO}, \
+               { K10,   K11,   K12,   K13,   K14,   K15,   K16,   KC_NO}, \
+               { K20,   K21,   K22,   K23,   K24,   K25,   KC_NO, KC_NO}, \
+               { K30,   K31,   K32,   K33,   K34,   K35,   KC_NO, KC_NO}, \
+               { K40,   K41,   K42,   K43,   K44,   K45,   KC_NO, KC_NO}, \
+               { K50,   K51,   K52,   KC_NO, K54,   K55,   KC_NO, KC_NO}, \
+               { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \
+               { K70  , K71,   K72,   K73,   K74,   K75,   K76,   K77}, \
+               { K80,   K81,   K82,   K83,   K84,   K85,   K86,   K87}, \
+               { K90,   K91,   K92,   K93,   K94,   K95,   K96,   K97}, \
+               { K100,  K101,  K102,  K103,  K104,  K105,  KC_NO, K107}, \
+               { K110,  K111,  K112,  K113,  K114,  K115,  K116,  K117}, \
+               { K120,  K121,  K122,  K123,  KC_NO, KC_NO, K126,  K127}, \
+               { KC_NO, KC_NO, K132,  K133,  K134,  K135,  K136,  K137} \
+       }
+
+#endif
\ No newline at end of file
diff --git a/keyboards/ergodox/keymaps/french_hacker/keymap.c b/keyboards/ergodox/keymaps/french_hacker/keymap.c
new file mode 100644 (file)
index 0000000..33b84c2
--- /dev/null
@@ -0,0 +1,365 @@
+#include "ergodox.h"
+#include "debug.h"
+#include "action_layer.h"
+#include "version.h"
+#include "keymap_french.h"
+
+#define BASE 0 // default Colemak Mod-DH layer
+#define SYMB 1 // symbols
+#define MDIA 2 // media keys
+#define ACC 3 // accented characters
+
+#define QCOPY 0 // Qubes OS VM to VM copy
+#define QPASTE 1 // Qubes OS VM to VM paste
+#define M_ACIRC 2 // Ã¢
+#define M_ECIRC 3 // Ãª
+#define M_ICIRC 4 // Ã®
+#define M_OCIRC 5 // Ã´
+#define M_UCIRC 6 // Ã»
+#define M_YCIRC 7 // Å·
+#define M_AUMLT 8 // Ã¤
+#define M_EUMLT 9 // Ã«
+#define M_IUMLT 10 // Ã¯
+#define M_OUMLT 11 // Ã¶
+#define M_UUMLT 12 // Ã¼
+#define M_YUMLT 13 // Ã¿
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Base Colemak Mod-DH layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * | Esc    |   1  |   2  |   3  |   4  |   5  |      |           |      |   6  |   7  |   8  |   9  |   0  |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   Q  |   W  |   F  |   P  |   B  | TO(0)|           |TO(2) |   J  |   L  |   U  |   Y  |   ;  |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * | Tab    |   A  |   R  |   S  |   T  |   G  |------|           |------|   M  |   N  |   E  |   I  |   O  | Bcksp  |
+ * |--------+------+------+------+------+------| TO(1)|           |OSL(3)|------+------+------+------+------+--------|
+ * | LShift |   Z  |   X  |   C  |   D  |   V  |      |           |      |   K  |   H  |   ,  |   .  |   :  | Rshift |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   | Ins  | Caps | Left | Right| MO(2)|                                       | MO(2)| Down |  Up  | PgDn | PgUp  |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |QCopy | Ralt |       | Ralt |QPaste|
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      | Home |       | End  |      |      |
+ *                                 | Space| Ctrl |------|       |------| Ctrl |Enter |
+ *                                 |      |      | LAlt |       | LAlt |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+  // If it accepts an argument (i.e, is a function), it doesn't need KC_.
+// Otherwise, it needs KC_*
+[BASE] = KEYMAP(  // layer 0 : default
+        // left hand
+        KC_ESC,         KC_1,         KC_2,   KC_3,   KC_4,   KC_5,   KC_TRNS,
+        KC_TRNS,        FR_Q,         FR_W,   KC_F,   KC_P,   KC_B,   TO(BASE),
+        KC_TAB,         FR_A,         KC_R,   KC_S,   KC_T,   KC_G,
+        KC_LSFT,        FR_Z,         KC_X,   KC_C,   KC_D,   KC_V,   TO(SYMB),
+        KC_INS,         KC_CAPS,      KC_LEFT,KC_RIGHT, MO(SYMB),
+                                               M(QCOPY),          KC_RALT,
+                                                                  KC_HOME,
+                                               KC_SPC,KC_LCTRL,   KC_LALT,
+        // right hand
+        KC_TRNS,     KC_6,    KC_7,   KC_8,     KC_9,    KC_0,             KC_TRNS,
+        TO(MDIA),    KC_J,    KC_L,   KC_U,     KC_Y,    FR_SCLN,          KC_TRNS,
+                     FR_M,    KC_N,   KC_E,     KC_I,    KC_O,             KC_BSPC,
+        OSL(ACC),    KC_K,    KC_H,   FR_COMM,  FR_DOT,  FR_COLN,          KC_RSFT,
+        MO(SYMB),    KC_DOWN, KC_UP,  KC_PGDN,  KC_PGUP,
+
+        KC_RALT,        M(QPASTE),
+        KC_END,
+        KC_LALT,KC_RCTL, KC_ENT
+                  ),
+
+
+/* Keymap 1: Symbol Layer
+ * // TODO missing: Â¤
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |Version |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   Â§  |   <  |   {  |   \  |   ~  |      |           |      |   %  |   @  |   }  |  >   |  Âµ   |   F12  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   '  |   =  |   -  |   (  |   +  |------|           |------|   *  |   )  |   _  |  /   |   "  |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   `  |   ?  |   #  |   [  |   |  |      |           |      |   &  |   ]  |   $  |   !  |   ^  |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |   â‚¬  |   Â£  |   $  |      |      |                                       |      |      |      |   ÃŸ  |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |      |      |------|       |------|      |      |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// SYMBOLS
+[SYMB] = KEYMAP(
+       // left hand
+       M(0),   KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_TRNS,
+       KC_TRNS,FR_SECT,FR_LESS,  FR_LCBR,FR_BSLS,FR_TILD,KC_TRNS,
+       KC_TRNS,FR_APOS,FR_EQL, FR_MINS,FR_LPRN,FR_PLUS,
+       KC_TRNS,FR_GRV,FR_QUES,FR_HASH,FR_LBRC,FR_PIPE,KC_TRNS,
+          FR_EURO,FR_PND,FR_DLR,KC_TRNS,KC_TRNS,
+                                       KC_TRNS,KC_TRNS,
+                                               KC_TRNS,
+                               KC_TRNS,KC_TRNS,KC_TRNS,
+       // right hand
+       KC_TRNS, KC_F6,   KC_F7,  KC_F8,   KC_F9,   KC_F10,  KC_F11,
+       KC_TRNS, FR_PERC, FR_AT,  FR_RCBR, FR_GRTR, FR_MU, KC_F12,
+                FR_ASTR,   FR_RPRN, FR_UNDS, FR_SLSH, FR_QUOT, KC_TRNS,
+       KC_TRNS, FR_AMP,  FR_RBRC, FR_DLR,  FR_EXLM,  FR_CIRC, KC_TRNS,
+                         KC_TRNS, KC_TRNS, KC_TRNS,  ALGR(KC_S),  KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS
+),
+/* Keymap 2: Media and mouse keys
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      |      | MsUp |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |MsLeft|MsDown|MsRght|      |------|           |------|      | Lclk | Rclk |      |      |  Play  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      | Prev | Next |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      | Lclk | Rclk |                                       |VolUp |VolDn | Mute |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |Brwser|
+ *                                 |      |      |------|       |------|      |Back  |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// MEDIA AND MOUSE
+[MDIA] = KEYMAP(
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
+       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,
+                                  KC_TRNS, KC_TRNS, 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_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_MPLY,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
+                          KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_WBAK
+),
+
+/* Keymap 3: accented characters
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      |  Ã    |  Ã¢   |  Ã¤   |      |      |           |      |      |      |  Ã®   |  Ã¯   |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |  Ã©   |  Ã¨   |  Ãª   |  Ã«   |      |------|           |------|      |      |  Ã´   |  Ã¶   |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |  Ã¹   |  Ã»   |  Ã¼   |      |      |           |      |      |      |  Å·   |  Ã¿   |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |      |      |------|       |------|      |      |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// ACCENTED CHARACTERS
+[ACC] = KEYMAP(
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,     KC_TRNS,    KC_TRNS, KC_TRNS,
+
+       KC_TRNS, KC_TRNS, FR_AGRV, M(M_ACIRC),  M(M_AUMLT), KC_TRNS, KC_TRNS,
+       KC_TRNS, FR_EACU, FR_EGRV, M(M_ECIRC),  M(M_EUMLT), KC_TRNS,
+       KC_TRNS, KC_TRNS, FR_UGRV, M(M_UCIRC),  M(M_UUMLT), 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,
+       // right hand
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS, KC_TRNS, M(M_ICIRC), M(M_IUMLT), KC_TRNS, KC_TRNS,
+                 KC_TRNS, KC_TRNS, M(M_OCIRC), M(M_OUMLT), KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS, KC_TRNS, M(M_YCIRC), M(M_YUMLT), 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
+),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+    [1] = ACTION_LAYER_TAP_TOGGLE(SYMB)                // FN1 - Momentary Layer 1 (Symbols)
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+  switch(id) {
+  case QCOPY:
+    if (record->event.pressed) {
+      return MACRO(I(255),
+                   D(LCTRL),
+                   T(C),
+                   D(LSFT),
+                   T(C),
+                   U(LCTRL),
+                   U(LSFT),
+                   END);
+    }
+    break;
+  case QPASTE:
+    if (record->event.pressed) {
+      return MACRO(I(255),
+                   D(LCTRL),
+                   D(LSFT),
+                   T(V),
+                   U(LCTRL),
+                   T(INS),
+                   U(LSFT),
+                   END);
+    }
+    break;
+  case M_ACIRC:
+    if (record->event.pressed) {
+      return MACRO(T(LBRC), // FR_CIRC
+                   T(Q), // FR_A
+                   END);
+    }
+    break;
+  case M_ECIRC:
+    if (record->event.pressed) {
+      return MACRO(T(LBRC), // FR_CIRC
+                   T(E),
+                   END);
+    }
+    break;
+  case M_UCIRC:
+    if (record->event.pressed) {
+      return MACRO(T(LBRC), // FR_CIRC
+                   T(U),
+                   END);
+    }
+    break;
+  case M_ICIRC:
+    if (record->event.pressed) {
+      return MACRO(T(LBRC), // FR_CIRC
+                   T(I),
+                   END);
+    }
+    break;
+  case M_OCIRC:
+    if (record->event.pressed) {
+      return MACRO(T(LBRC), // FR_CIRC
+                   T(O),
+                   END);
+    }
+    break;
+  case M_YCIRC:
+    if (record->event.pressed) {
+      return MACRO(T(LBRC), // FR_CIRC
+                   T(Y),
+                   END);
+    }
+    break;
+  case M_AUMLT:
+    if (record->event.pressed) {
+      return MACRO(D(LSFT),
+                   T(LBRC),
+                   U(LSFT),
+                   T(Q),
+                   END);
+    }
+    break;
+  case M_EUMLT:
+    if (record->event.pressed) {
+      return MACRO(D(LSFT),
+                   T(LBRC),
+                   U(LSFT),
+                   T(E),
+                   END);
+    }
+    break;
+  case M_UUMLT:
+    if (record->event.pressed) {
+      return MACRO(D(LSFT),
+                   T(LBRC),
+                   U(LSFT),
+                   T(U),
+                   END);
+    }
+    break;
+  case M_IUMLT:
+    if (record->event.pressed) {
+      return MACRO(D(LSFT),
+                   T(LBRC),
+                   U(LSFT),
+                   T(I),
+                   END);
+    }
+    break;
+  case M_OUMLT:
+    if (record->event.pressed) {
+      return MACRO(D(LSFT),
+                   T(LBRC),
+                   U(LSFT),
+                   T(O),
+                   END);
+    }
+    break;
+  case M_YUMLT:
+    if (record->event.pressed) {
+      return MACRO(D(LSFT),
+                   T(LBRC),
+                   U(LSFT),
+                   T(Y),
+                   END);
+    }
+    break;
+
+  }
+  return MACRO_NONE;
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+
+    uint8_t layer = biton32(layer_state);
+
+    ergodox_board_led_off();
+    ergodox_right_led_1_off();
+    ergodox_right_led_2_off();
+    ergodox_right_led_3_off();
+    switch (layer) {
+    case SYMB:
+      ergodox_right_led_1_on();
+      break;
+    case MDIA:
+      ergodox_right_led_2_on();
+      break;
+    case ACC:
+      ergodox_right_led_3_on();
+      break;
+    default:
+      // none
+      break;
+    }
+
+};
diff --git a/keyboards/ergodox/keymaps/french_hacker/readme.md b/keyboards/ergodox/keymaps/french_hacker/readme.md
new file mode 100644 (file)
index 0000000..6b0575a
--- /dev/null
@@ -0,0 +1,30 @@
+# French hacker layout
+
+## Introduction
+
+[Colemak Mod-DH](https://colemakmods.github.io/mod-dh/) layout for
+users keeping an `azerty` layout configuration on their OS.
+
+This keymap is for users keeping their operating systems configured with
+`azerty` - for typing passwords or in their native languages - but who
+wants a Colemak Mod-DH layout on their mechanical.
+
+The symbols layers was done after analysing various programming
+languages sources codes and should be close to optimal for typing
+confort.
+
+Special macros for [Qubes OS](https://www.qubes-os.org/) are included.
+
+There is an accented characters layer for infrequent typing of french
+accents.
+
+Special macros for [Qubes OS](https://www.qubes-os.org/) are included.
+
+## Build
+
+    cd keyboards/ergodox
+    make french_hacker
+
+## Design explanations
+
+See my [blog post](http://dialectical-computing.de/blog/blog/2017/01/29/a-better-coder-layout-for-the-ergodox-ez-keyboard/).
index 81dfb14455ae52742e08372de6901a79c49069b0..4def27239c5d9e64278549fdb70066e526eeca6e 100644 (file)
@@ -21,9 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <stdint.h>
 #include <stdbool.h>
 #include <avr/io.h>
-#include <avr/wdt.h>
-#include <avr/interrupt.h>
-#include <util/delay.h>
+#include "wait.h"
 #include "print.h"
 #include "debug.h"
 #include "util.h"
@@ -31,6 +29,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "split_util.h"
 #include "pro_micro.h"
 #include "config.h"
+#include "timer.h"
 
 #ifdef USE_I2C
 #  include "i2c.h"
@@ -38,14 +37,29 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #  include "serial.h"
 #endif
 
-#ifndef DEBOUNCE
-#  define DEBOUNCE     5
+#ifndef DEBOUNCING_DELAY
+#   define DEBOUNCING_DELAY 5
 #endif
 
+#if (DEBOUNCING_DELAY > 0)
+    static uint16_t debouncing_time;
+    static bool debouncing = false;
+#endif
+
+#if (MATRIX_COLS <= 8)
+#    define print_matrix_header()  print("\nr/c 01234567\n")
+#    define print_matrix_row(row)  print_bin_reverse8(matrix_get_row(row))
+#    define matrix_bitpop(i)       bitpop(matrix[i])
+#    define ROW_SHIFTER ((uint8_t)1)
+#else
+#    error "Currently only supports 8 COLS"
+#endif
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
 #define ERROR_DISCONNECT_COUNT 5
 
-static uint8_t debouncing = DEBOUNCE;
-static const int ROWS_PER_HAND = MATRIX_ROWS/2;
+#define ROWS_PER_HAND (MATRIX_ROWS/2)
+
 static uint8_t error_count = 0;
 
 static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
@@ -55,11 +69,19 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
 static matrix_row_t matrix[MATRIX_ROWS];
 static matrix_row_t matrix_debouncing[MATRIX_ROWS];
 
-static matrix_row_t read_cols(void);
-static void init_cols(void);
-static void unselect_rows(void);
-static void select_row(uint8_t row);
-
+#if (DIODE_DIRECTION == COL2ROW)
+    static void init_cols(void);
+    static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
+    static void unselect_rows(void);
+    static void select_row(uint8_t row);
+    static void unselect_row(uint8_t row);
+#elif (DIODE_DIRECTION == ROW2COL)
+    static void init_rows(void);
+    static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
+    static void unselect_cols(void);
+    static void unselect_col(uint8_t col);
+    static void select_col(uint8_t col);
+#endif
 __attribute__ ((weak))
 void matrix_init_quantum(void) {
     matrix_init_kb();
@@ -118,33 +140,54 @@ void matrix_init(void)
     }
 
     matrix_init_quantum();
+
 }
 
 uint8_t _matrix_scan(void)
 {
-    // Right hand is stored after the left in the matirx so, we need to offset it
     int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
+#if (DIODE_DIRECTION == COL2ROW)
+    // Set row, read cols
+    for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
+#       if (DEBOUNCING_DELAY > 0)
+            bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
+
+            if (matrix_changed) {
+                debouncing = true;
+                debouncing_time = timer_read();
+                PORTD ^= (1 << 2);
+            }
+
+#       else
+            read_cols_on_row(matrix+offset, current_row);
+#       endif
+
+    }
+
+#elif (DIODE_DIRECTION == ROW2COL)
+    // Set col, read rows
+    for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+#       if (DEBOUNCING_DELAY > 0)
+            bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
+            if (matrix_changed) {
+                debouncing = true;
+                debouncing_time = timer_read();
+            }
+#       else
+             read_rows_on_col(matrix+offset, current_col);
+#       endif
 
-    for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
-        select_row(i);
-        _delay_us(30);  // without this wait read unstable value.
-        matrix_row_t cols = read_cols();
-        if (matrix_debouncing[i+offset] != cols) {
-            matrix_debouncing[i+offset] = cols;
-            debouncing = DEBOUNCE;
-        }
-        unselect_rows();
     }
+#endif
 
-    if (debouncing) {
-        if (--debouncing) {
-            _delay_ms(1);
-        } else {
+#   if (DEBOUNCING_DELAY > 0)
+        if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
             for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
                 matrix[i+offset] = matrix_debouncing[i+offset];
             }
+            debouncing = false;
         }
-    }
+#   endif
 
     return 1;
 }
@@ -200,9 +243,7 @@ int serial_transaction(void) {
 
 uint8_t matrix_scan(void)
 {
-    int ret = _matrix_scan();
-
-
+    uint8_t ret = _matrix_scan();
 
 #ifdef USE_I2C
     if( i2c_transaction() ) {
@@ -233,11 +274,10 @@ uint8_t matrix_scan(void)
 void matrix_slave_scan(void) {
     _matrix_scan();
 
-    int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2);
+    int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
 
 #ifdef USE_I2C
     for (int i = 0; i < ROWS_PER_HAND; ++i) {
-        /* i2c_slave_buffer[i] = matrix[offset+i]; */
         i2c_slave_buffer[i] = matrix[offset+i];
     }
 #else // USE_SERIAL
@@ -284,33 +324,141 @@ uint8_t matrix_key_count(void)
     return count;
 }
 
-static void  init_cols(void)
+#if (DIODE_DIRECTION == COL2ROW)
+
+static void init_cols(void)
 {
-    for(int x = 0; x < MATRIX_COLS; x++) {
-        _SFR_IO8((col_pins[x] >> 4) + 1) &=  ~_BV(col_pins[x] & 0xF);
-        _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
+    for(uint8_t x = 0; x < MATRIX_COLS; x++) {
+        uint8_t pin = col_pins[x];
+        _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+        _SFR_IO8((pin >> 4) + 2) |=  _BV(pin & 0xF); // HI
     }
 }
 
-static matrix_row_t read_cols(void)
+static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
 {
-    matrix_row_t result = 0;
-    for(int x = 0; x < MATRIX_COLS; x++) {
-        result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
+    // Store last value of row prior to reading
+    matrix_row_t last_row_value = current_matrix[current_row];
+
+    // Clear data in matrix row
+    current_matrix[current_row] = 0;
+
+    // Select row and wait for row selecton to stabilize
+    select_row(current_row);
+    wait_us(30);
+
+    // For each col...
+    for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+
+        // Select the col pin to read (active low)
+        uint8_t pin = col_pins[col_index];
+        uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
+
+        // Populate the matrix row with the state of the col pin
+        current_matrix[current_row] |=  pin_state ? 0 : (ROW_SHIFTER << col_index);
     }
-    return result;
+
+    // Unselect row
+    unselect_row(current_row);
+
+    return (last_row_value != current_matrix[current_row]);
+}
+
+static void select_row(uint8_t row)
+{
+    uint8_t pin = row_pins[row];
+    _SFR_IO8((pin >> 4) + 1) |=  _BV(pin & 0xF); // OUT
+    _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
+}
+
+static void unselect_row(uint8_t row)
+{
+    uint8_t pin = row_pins[row];
+    _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+    _SFR_IO8((pin >> 4) + 2) |=  _BV(pin & 0xF); // HI
 }
 
 static void unselect_rows(void)
 {
-    for(int x = 0; x < ROWS_PER_HAND; x++) {
-        _SFR_IO8((row_pins[x] >> 4) + 1) &=  ~_BV(row_pins[x] & 0xF);
-        _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
+    for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+        uint8_t pin = row_pins[x];
+        _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+        _SFR_IO8((pin >> 4) + 2) |=  _BV(pin & 0xF); // HI
     }
 }
 
-static void select_row(uint8_t row)
+#elif (DIODE_DIRECTION == ROW2COL)
+
+static void init_rows(void)
+{
+    for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+        uint8_t pin = row_pins[x];
+        _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+        _SFR_IO8((pin >> 4) + 2) |=  _BV(pin & 0xF); // HI
+    }
+}
+
+static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
+{
+    bool matrix_changed = false;
+
+    // Select col and wait for col selecton to stabilize
+    select_col(current_col);
+    wait_us(30);
+
+    // For each row...
+    for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++)
+    {
+
+        // Store last value of row prior to reading
+        matrix_row_t last_row_value = current_matrix[row_index];
+
+        // Check row pin state
+        if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0)
+        {
+            // Pin LO, set col bit
+            current_matrix[row_index] |= (ROW_SHIFTER << current_col);
+        }
+        else
+        {
+            // Pin HI, clear col bit
+            current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
+        }
+
+        // Determine if the matrix changed state
+        if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
+        {
+            matrix_changed = true;
+        }
+    }
+
+    // Unselect col
+    unselect_col(current_col);
+
+    return matrix_changed;
+}
+
+static void select_col(uint8_t col)
+{
+    uint8_t pin = col_pins[col];
+    _SFR_IO8((pin >> 4) + 1) |=  _BV(pin & 0xF); // OUT
+    _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
+}
+
+static void unselect_col(uint8_t col)
+{
+    uint8_t pin = col_pins[col];
+    _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+    _SFR_IO8((pin >> 4) + 2) |=  _BV(pin & 0xF); // HI
+}
+
+static void unselect_cols(void)
 {
-    _SFR_IO8((row_pins[row] >> 4) + 1) |=  _BV(row_pins[row] & 0xF);
-    _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
+    for(uint8_t x = 0; x < MATRIX_COLS; x++) {
+        uint8_t pin = col_pins[x];
+        _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+        _SFR_IO8((pin >> 4) + 2) |=  _BV(pin & 0xF); // HI
+    }
 }
+
+#endif
index 39639c3b4bd885bdc38bc570f342b65e5d08877e..346cbc908949f8ec09f077b9249f9826fa75b620 100644 (file)
@@ -8,6 +8,7 @@
 #include "matrix.h"
 #include "keyboard.h"
 #include "config.h"
+#include "timer.h"
 
 #ifdef USE_I2C
 #  include "i2c.h"
@@ -42,6 +43,7 @@ static void keyboard_master_setup(void) {
 }
 
 static void keyboard_slave_setup(void) {
+  timer_init();
 #ifdef USE_I2C
     i2c_slave_init(SLAVE_I2C_ADDRESS);
 #else
index 3a8250a9b56355f8c6d5a43dba24058c674c5687..29108e522b6b575d15b663ffc42fc237f8f3f9c2 100644 (file)
@@ -1,11 +1,11 @@
 
 
 # Build Options
-#   change to "no" to disable the options, or define them in the Makefile in 
+#   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 = no       # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+MOUSEKEY_ENABLE = no        # 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
@@ -17,6 +17,7 @@ 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.
 ONEHAND_ENABLE = yes        # Enable one-hand typing
+STENO_ENABLE = yes                                     # Enable TX Bolt protocol for Stenography, requires VIRTSER and may not work with mouse keys
 
 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
 SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend
index 492490ca1c894a02cbb9412de98aee05fc19417f..0864b5fbc92df64ab5292fd7756ce5589a45ea7a 100644 (file)
@@ -5,6 +5,7 @@
 
 #define LEADER_TIMEOUT 300
 #define BACKLIGHT_BREATHING
+#define PREVENT_STUCK_MODIFIERS
 
 
 /* ws2812 RGB LED */
index 17fad784e7c00d2889b9f6d0ae459d5edb5ee422..2d648b211aa119533c01eec6ba4bb7a4b15ef485 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "planck.h"
 #include "action_layer.h"
+#include "keymap_steno.h"
 #ifdef AUDIO_ENABLE
   #include "audio.h"
 #endif
@@ -49,7 +50,7 @@ enum planck_keycodes {
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 [0] = {
-  {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
+  {QWERTY, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
   {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
   {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
   {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}
@@ -158,10 +159,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  */
 
 [_PLOVER] = {
-  {KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1   },
-  {XXXXXXX, KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC},
-  {XXXXXXX, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT},
-  {EXT_PLV, XXXXXXX, XXXXXXX, KC_C,    KC_V,    XXXXXXX, XXXXXXX, KC_N,    KC_M,    XXXXXXX, XXXXXXX, XXXXXXX}
+  {STN_N1,  STN_N2,  STN_N3,  STN_N4,  STN_N5,  STN_N6,  STN_N7,  STN_N8,  STN_N9,  STN_NA,  STN_NB,  STN_NC },
+  {STN_FN,  STN_S1,  STN_TL,  STN_PL,  STN_HL,  STN_ST1, STN_ST3, STN_FR,  STN_PR,  STN_LR,  STN_TR,  STN_DR },
+  {XXXXXXX, STN_S2,  STN_KL,  STN_WL,  STN_RL,  STN_ST2, STN_ST4, STN_RR,  STN_BR,  STN_GR,  STN_SR,  STN_ZR },
+  {EXT_PLV, XXXXXXX, XXXXXXX, STN_A,   STN_O,   XXXXXXX, XXXXXXX, STN_E,   STN_U,   STN_PWR, STN_RE1, STN_RE2}
 },
 
 /* Adjust (Lower + Raise)
@@ -279,21 +280,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         break;
       return false;
         case PLOVER:
-          if (record->event.pressed) {
+          if (!record->event.pressed) {
             #ifdef AUDIO_ENABLE
               stop_all_notes();
               PLAY_NOTE_ARRAY(tone_plover, false, 0);
             #endif
-            layer_off(_RAISE);
-            layer_off(_LOWER);
-            layer_off(_ADJUST);
             layer_on(_PLOVER);
-            if (!eeconfig_is_enabled()) {
-                eeconfig_init();
-            }
-            keymap_config.raw = eeconfig_read_keymap();
-            keymap_config.nkro = 1;
-            eeconfig_update_keymap(keymap_config.raw);
           }
         break;
       return false;
@@ -397,9 +389,9 @@ void music_scale_user(void)
 LEADER_EXTERNS();
 
 void matrix_scan_user(void) {
-  LEADER_DICTIONARY() { 
+  LEADER_DICTIONARY() {
     leading = false;
-    leader_end(); 
+    leader_end();
 
     SEQ_ONE_KEY (KC_R) {
       tap_random_base64();
diff --git a/keyboards/planck/keymaps/steno/Makefile b/keyboards/planck/keymaps/steno/Makefile
new file mode 100644 (file)
index 0000000..874154a
--- /dev/null
@@ -0,0 +1,7 @@
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
+
+MOUSEKEY_ENABLE = no        # Mouse keys(+4700)
+STENO_ENABLE = yes          # Additional protocols for Stenography(+1700), requires VIRTSER
+AUDIO_ENABLE = no           # Audio output on port C6
diff --git a/keyboards/planck/keymaps/steno/config.h b/keyboards/planck/keymaps/steno/config.h
new file mode 100644 (file)
index 0000000..1879ab0
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#ifdef AUDIO_ENABLE
+    #define STARTUP_SONG SONG(PLANCK_SOUND)
+    // #define STARTUP_SONG SONG(NO_SOUND)
+
+    #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+                                  SONG(COLEMAK_SOUND), \
+                                  SONG(DVORAK_SOUND) \
+                                }
+#endif
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+#define PREVENT_STUCK_MODIFIERS
+
+/*
+ * 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 2
+
+#endif
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/steno/keymap.c b/keyboards/planck/keymaps/steno/keymap.c
new file mode 100644 (file)
index 0000000..38540a2
--- /dev/null
@@ -0,0 +1,256 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * 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 "planck.h"
+#include "action_layer.h"
+#include "keymap_steno.h"
+
+extern keymap_config_t keymap_config;
+
+enum planck_layers {
+  _QWERTY,
+  _COLEMAK,
+  _DVORAK,
+  _LOWER,
+  _RAISE,
+  _PLOVER,
+  _ADJUST
+};
+
+enum planck_keycodes {
+  QWERTY = SAFE_RANGE,
+  COLEMAK,
+  DVORAK,
+  PLOVER,
+  LOWER,
+  RAISE,
+  BACKLIT,
+  EXT_PLV
+};
+
+#define ST_BOLT QK_STENO_BOLT
+#define ST_GEM  QK_STENO_GEMINI
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = {
+  {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC},
+  {KC_ESC,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT},
+  {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
+  {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+},
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |   ;  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   R  |   S  |   T  |   D  |   H  |   N  |   E  |   I  |   O  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   K  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = {
+  {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
+  {KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
+  {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
+  {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+},
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   "  |   ,  |   .  |   P  |   Y  |   F  |   G  |   C  |   R  |   L  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   O  |   E  |   U  |   I  |   D  |   H  |   T  |   N  |   S  |  /   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   ;  |   Q  |   J  |   K  |   X  |   B  |   M  |   W  |   V  |   Z  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = {
+  {KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_BSPC},
+  {KC_ESC,  KC_A,    KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_SLSH},
+  {KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    KC_ENT },
+  {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+},
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |   {  |   }  |  |   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO ~ |ISO | | Home | End  |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = {
+  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR,    KC_ASTR,    KC_LPRN, KC_RPRN, KC_BSPC},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS,    KC_PLUS,    KC_LCBR, KC_RCBR, KC_PIPE},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END,  _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______,    KC_MNXT,    KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  \   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO # |ISO / |Pg Up |Pg Dn |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = {
+  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Plover layer (http://opensteno.org)
+ * ,-----------------------------------------------------------------------------------.
+ * |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |  FN  |   S  |   T  |   P  |   H  |   *  |   *  |   F  |   P  |   L  |   T  |   D  |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |   S  |   K  |   W  |   R  |   *  |   *  |   R  |   B  |   G  |   S  |   Z  |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Exit |      |      |   A  |   O  |             |   E  |   U  |  PWR | RES1 | RES2 |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+[_PLOVER] = {
+  {STN_N1,  STN_N2,  STN_N3,  STN_N4,  STN_N5,  STN_N6,  STN_N7,  STN_N8,  STN_N9,  STN_NA,  STN_NB,  STN_NC },
+  {STN_FN,  STN_S1,  STN_TL,  STN_PL,  STN_HL,  STN_ST1, STN_ST3, STN_FR,  STN_PR,  STN_LR,  STN_TR,  STN_DR },
+  {XXXXXXX, STN_S2,  STN_KL,  STN_WL,  STN_RL,  STN_ST2, STN_ST4, STN_RR,  STN_BR,  STN_GR,  STN_SR,  STN_ZR },
+  {EXT_PLV, XXXXXXX, XXXXXXX, STN_A,   STN_O,   XXXXXXX, XXXXXXX, STN_E,   STN_U,   STN_PWR, STN_RE1, STN_RE2}
+},
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * |      | Reset|      |      |      |      |      |      |      |      |      |  Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |      |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover|      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|      |      |      |TXBOLT|GEM RP|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = {
+  {_______, RESET,   _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
+  {_______, _______, MU_MOD,  AU_ON,   AU_OFF,  AG_NORM, AG_SWAP, QWERTY,  COLEMAK, DVORAK,  PLOVER,  _______},
+  {_______, MUV_DE,  MUV_IN,  MU_ON,   MU_OFF,  MI_ON,   MI_OFF,  _______, _______, _______, ST_BOLT, ST_GEM},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+}
+
+
+};
+
+#ifdef AUDIO_ENABLE
+  float plover_song[][2]     = SONG(PLOVER_SOUND);
+  float plover_gb_song[][2]  = SONG(PLOVER_GOODBYE_SOUND);
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QWERTY:
+      if (record->event.pressed) {
+        set_single_persistent_default_layer(_QWERTY);
+      }
+      return false;
+      break;
+    case COLEMAK:
+      if (record->event.pressed) {
+        set_single_persistent_default_layer(_COLEMAK);
+      }
+      return false;
+      break;
+    case DVORAK:
+      if (record->event.pressed) {
+        set_single_persistent_default_layer(_DVORAK);
+      }
+      return false;
+      break;
+    case LOWER:
+      if (record->event.pressed) {
+        layer_on(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case RAISE:
+      if (record->event.pressed) {
+        layer_on(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case BACKLIT:
+      if (record->event.pressed) {
+        register_code(KC_RSFT);
+        #ifdef BACKLIGHT_ENABLE
+          backlight_step();
+        #endif
+      } else {
+        unregister_code(KC_RSFT);
+      }
+      return false;
+      break;
+    case PLOVER:
+      if (!record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          stop_all_notes();
+          PLAY_SONG(plover_song);
+        #endif
+        layer_on(_PLOVER);
+      }
+      return false;
+      break;
+    case EXT_PLV:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_SONG(plover_gb_song);
+        #endif
+        layer_off(_PLOVER);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/steno/readme.md b/keyboards/planck/keymaps/steno/readme.md
new file mode 100644 (file)
index 0000000..e8ffd97
--- /dev/null
@@ -0,0 +1,4 @@
+# The Default Planck Layout with TX Bolt for the Plover Layer
+
+To use set Plover to TX Bolt and select the COM port that represents your keyboard.
+
index 9ee3fc7abc6f1e0d9573a2898b6679db08fc9e13..5d72a2a4134ef9ef4a0b98b7fcfe2ab7e55e664d 100644 (file)
@@ -57,3 +57,4 @@ These keyboards are part of the QMK repository, but their manufacturers are not
 * [TheVan 44](/keyboards/tv44) &mdash; A 44-key staggered keybard by Evangs.
 * [WhiteFox](/keyboards/whitefox) &mdash; A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club
 * [Vision Division](/keyboards/vision_division) &mdash; Full Size / Split Linear Keyboard by IBNobody.
+* [XD75](/keyboards/xd75) &mdash; 15x5 ortholinear keyboard by XIUDI.
diff --git a/keyboards/xd75/Makefile b/keyboards/xd75/Makefile
new file mode 100644 (file)
index 0000000..840dc9a
--- /dev/null
@@ -0,0 +1,18 @@
+# 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/>.
+
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
diff --git a/keyboards/xd75/config.h b/keyboards/xd75/config.h
new file mode 100644 (file)
index 0000000..3764cfb
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+Copyright 2017 REPLACE_WITH_YOUR_NAME
+
+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_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xCDCD
+#define PRODUCT_ID      0x7575
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    xiudi
+#define PRODUCT         XD75
+#define DESCRIPTION     XD75Re 15x5 ortholinear keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
+#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+#define BACKLIGHT_PIN F5
+#define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * 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)) \
+)
+
+/* 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
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+// ws2812 options
+#define RGB_DI_PIN F6 // pin the DI on the ws2812 is hooked-up to
+#define RGBLIGHT_ANIMATIONS // run RGB animations
+#define RGBLED_NUM 6 // number of LEDs
+#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
+#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
+#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
+
+/*
+ * 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/xd75/keymaps/default/Makefile b/keyboards/xd75/keymaps/default/Makefile
new file mode 100644 (file)
index 0000000..6e8941f
--- /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/xd75/keymaps/default/config.h b/keyboards/xd75/keymaps/default/config.h
new file mode 100644 (file)
index 0000000..f52a97b
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+ *
+ * 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/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..82ea1f2
--- /dev/null
@@ -0,0 +1,186 @@
+/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+ *
+ * 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 "xd75.h"
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define ___T___ KC_TRNS
+#define XXXXXXX KC_NO
+
+// Layer shorthand
+#define _QW 0
+#define _CM 1
+#define _DV 2
+#define _LW 3
+#define _RS 4
+#define _FN 5
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* QWERTY - MIT ENHANCED / GRID COMPATIBLE
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | `      | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | XXXXXX . BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB    | Q      | W      | E      | R      | T      | Y      | U      | I      | O      | P      | [      | ]      | \      | DEL    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | ESC    | A      | S      | D      | F      | G      | H      | J      | K      | L      | ;      | '      | XXXXXX . ENTER  | PG UP  |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * | LSHIFT | Z      | X      | C      | V      | B      | N      | M      | ,      | .      | /      | XXXXXX . RSHIFT | UP     | PG DN  |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | BRITE  | LCTRL  | LALT   | LGUI   | RAISE  | XXXXXX . SPACE  | LOWER  | RGUI   | RALT   | RCTRL  | FN     | LEFT   | DOWN   | RIGHT  |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+       
+ [_QW] = { /* QWERTY */
+  { 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_BSPC  },
+  { 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_ESC,  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_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_RSFT, KC_UP,   KC_PGDN  },
+  { M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC,  KC_SPC,  MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT  },
+ },
+
+/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | `      | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | XXXXXX . BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB    | Q      | W      | F      | P      | G      | J      | L      | U      | Y      | ;      | [      | ]      | \      | DEL    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | ESC    | A      | R      | S      | T      | D      | H      | N      | E      | I      | O      | '      | XXXXXX . ENTER  | PG UP  |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * | LSHIFT | Z      | X      | C      | V      | B      | K      | M      | ,      | .      | /      | XXXXXX . RSHIFT | UP     | PG DN  |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | BRITE  | LCTRL  | LALT   | LGUI   | RAISE  | XXXXXX . SPACE  | LOWER  | RGUI   | RALT   | RCTRL  | FN     | LEFT   | DOWN   | RIGHT  |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+       
+ [_CM] = { /* COLEMAK */
+  { 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_BSPC  },
+  { KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL   },
+  { KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT, KC_ENT,  KC_ENT,  KC_PGUP  },
+  { KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,   KC_PGDN  },
+  { M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC,  KC_SPC,  MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT  },
+ },
+       
+/* DVORAK - MIT ENHANCED / GRID COMPATIBLE
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | `      | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | XXXXXX . BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB    | '      | ,      | .      | P      | Y      | F      | G      | C      | R      | L      | [      | ]      | \      | DEL    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | ESC    | A      | O      | E      | U      | I      | D      | H      | T      | N      | S      | /      | XXXXXX . ENTER  | PG UP  |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * | LSHIFT | ;      | Q      | J      | K      | X      | B      | M      | W      | V      | Z      | XXXXXX . RSHIFT | UP     | PG DN  |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | BRITE  | LCTRL  | LALT   | LGUI   | RAISE  | XXXXXX . SPACE  | LOWER  | RGUI   | RALT   | RCTRL  | FN     | LEFT   | DOWN   | RIGHT  |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_DV] = { /* DVORAK */
+  { 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_BSPC  },
+  { KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL   },
+  { KC_ESC,  KC_A,    KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_SLSH, KC_ENT,  KC_ENT,  KC_PGUP  },
+  { KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    KC_RSFT, KC_RSFT, KC_UP,   KC_PGDN  },
+  { M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC,  KC_SPC,  MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT  },
+ },
+
+/* LOWERED
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * |        | F1     | F2     | F3     | F4     | F5     | F6     | F7     | F8     | F9     | F10    | F11    | F12    | XXXXXX .        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * |        | !      | @      | #      | $      | %      | ^      | &      | *      | (      | )      |        |        |        | INS    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * |        | F1     | F2     | F3     | F4     | F5     | F6     | _      | +      | {      | }      | |      | XXXXXX .        |        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * |        | F7     | F8     | F9     | F10    | F11    | F12    |        |        |        |        | XXXXXX .        |        |        |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * |        |        |        |        |        | XXXXXX .        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+ [_LW] = { /* LOWERED */
+  { _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { _______, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS   },
+  { _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______  },
+  { _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, ___T___, ___T___, _______, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______  },
+ },
+
+/* RAISED
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * |        | F1     | F2     | F3     | F4     | F5     | F6     | F7     | F8     | F9     | F10    | F11    | F12    | XXXXXX .        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * |        | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      |        |        |        | INS    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * |        | F1     | F2     | F3     | F4     | F5     | F6     | -      | =      | [      | ]      | \      | XXXXXX .        |        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * |        | F7     | F8     | F9     | F10    | F11    | F12    |        |        |        |        | XXXXXX .        |        |        |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * |        |        |        |        |        | XXXXXX .        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+ [_RS] = { /* RAISED */
+  { _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { _______, KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    _______, _______, _______, KC_INS   },
+  { _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______  },
+  { _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, ___T___, ___T___, _______, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______  },
+ },
+/* FUNCTION
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | NUM LK | F1     | F2     | F3     | F4     | F5     | F6     | F7     | F8     | F9     | F10    | F11    | F12    | XXXXXX .        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | SCR LK | F13    | F14    | F15    | F16    | F17    | F18    | F19    | F20    | F21    | F22    | F23    | F24    | PAUSE  | PR SCR |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT   | VOL+   | VOL-   | PLAY   |        | XXXXXX .        | WHEEL+ |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX .        | MOUS U | WHEEL- |
+ * |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | RESET  |        | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 |        |        |        |        |        | MOUS L | MOUS D | MOUS R |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+ [_FN] = { /* FUNCTION */
+  { KC_NLCK, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { KC_SLCK, KC_F13,  KC_F14,  KC_F15,  KC_F16,  KC_F17,  KC_F18,  KC_F19,  KC_F20,  KC_F21,  KC_F22,  KC_F23,  KC_F24,  KC_PAUS, KC_PSCR  },
+  { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U  },
+  { RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC,  BL_DEC,   ___T___, ___T___, KC_MS_U, KC_WH_D  },
+  { RESET  , _______, DF(_QW), DF(_CM), DF(_DV), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R  },
+ },
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+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);
+            #ifdef BACKLIGHT_ENABLE
+              backlight_step();
+            #endif
+          } else {
+            unregister_code(KC_RSFT);
+          }
+        break;
+      }
+    return MACRO_NONE;
+};
diff --git a/keyboards/xd75/keymaps/default/readme.md b/keyboards/xd75/keymaps/default/readme.md
new file mode 100644 (file)
index 0000000..d53c0f3
--- /dev/null
@@ -0,0 +1 @@
+# The default keymap for xd75
diff --git a/keyboards/xd75/readme.md b/keyboards/xd75/readme.md
new file mode 100644 (file)
index 0000000..0bc82be
--- /dev/null
@@ -0,0 +1,30 @@
+xd75 keyboard firmware
+======================
+
+The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request!
+
+## Quantum MK Firmware
+
+For more info on this firmware (and how to make it your own), head over to [qmk.fm](http://qmk.fm).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/xd75 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+
+To build with the default keymap, simply run `make default`.
+
+### Other Keymaps
+
+The "default" keymap included is basically the OLKB Atomic keymap with a few buttons added for RGB underglow control. This should be usable as a starting point, but most people will be best served creating their own keymap and flashing it - more info on creating your own keymap is available in [the official QMK documentation](https://docs.qmk.fm).
+
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
+```
+$ make [default|jack|<name>]
+```
+
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/xd75/rules.mk b/keyboards/xd75/rules.mk
new file mode 100644 (file)
index 0000000..f6d8978
--- /dev/null
@@ -0,0 +1,68 @@
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4996
+
+
+# Build Options
+#   change yes to no to disable
+#
+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
+# 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 ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= yes       # Enable keyboard backlight functionality on B7 by default
+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
diff --git a/keyboards/xd75/xd75.c b/keyboards/xd75/xd75.c
new file mode 100644 (file)
index 0000000..3d635f3
--- /dev/null
@@ -0,0 +1,43 @@
+/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+ *
+ * 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 "xd75.h"
+
+void matrix_init_kb(void) {
+       // put your keyboard start-up code here
+       // runs once when the firmware starts up
+
+       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_set_kb(uint8_t usb_led) {
+       // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+       led_set_user(usb_led);
+}
diff --git a/keyboards/xd75/xd75.h b/keyboards/xd75/xd75.h
new file mode 100644 (file)
index 0000000..22bc2ec
--- /dev/null
@@ -0,0 +1,39 @@
+/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+ *
+ * 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 XD75_H
+#define XD75_H
+
+#include "quantum.h"
+
+// This a shortcut to help you visually see your layout.
+// The following is an example using the Planck MIT layout
+// The first section contains all of the arguments
+// The second converts the arguments into a two-dimensional array
+#define KEYMAP( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\
+    K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \
+) { \
+    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \
+    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \
+    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E }, \
+    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E }, \
+    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E }  \
+}
+
+#endif
diff --git a/quantum/keymap_extras/keymap_steno.h b/quantum/keymap_extras/keymap_steno.h
new file mode 100644 (file)
index 0000000..4ce91cc
--- /dev/null
@@ -0,0 +1,76 @@
+/* Copyright 2017 Joseph Wasson
+ *
+ * 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 KEYMAP_STENO_H
+#define KEYMAP_STENO_H
+
+#include "keymap.h"
+
+// List of keycodes for the steno keyboard. To prevent
+// errors, this must be <= 42 total entries in order to
+// support the GeminiPR protocol.
+enum steno_keycodes {
+  STN__MIN = QK_STENO,
+  STN_FN  = STN__MIN,
+  STN_NUM,
+  STN_N1 = STN_NUM,
+  STN_N2,
+  STN_N3,
+  STN_N4,
+  STN_N5,
+  STN_N6,
+  STN_SL,
+  STN_S1 = STN_SL,
+  STN_S2,
+  STN_TL,
+  STN_KL,
+  STN_PL,
+  STN_WL,
+  STN_HL,
+  STN_RL,
+  STN_A,
+  STN_O,
+  STN_STR,
+  STN_ST1 = STN_STR,
+  STN_ST2,
+  STN_RES1,
+  STN_RE1 = STN_RES1,
+  STN_RES2,
+  STN_RE2 = STN_RES2,
+  STN_PWR,
+  STN_ST3,
+  STN_ST4,
+  STN_E,
+  STN_U,
+  STN_FR,
+  STN_RR,
+  STN_PR,
+  STN_BR,
+  STN_LR,
+  STN_GR,
+  STN_TR,
+  STN_SR,
+  STN_DR,
+  STN_N7,
+  STN_N8,
+  STN_N9,
+  STN_NA,
+  STN_NB,
+  STN_NC,
+  STN_ZR,
+  STN__MAX = STN_ZR, // must be less than QK_STENO_BOLT
+};
+
+#endif
diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c
new file mode 100644 (file)
index 0000000..71e5e8f
--- /dev/null
@@ -0,0 +1,166 @@
+/* Copyright 2017 Joseph Wasson
+ *
+ * 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 "process_steno.h"
+#include "quantum_keycodes.h"
+#include "keymap_steno.h"
+#include "virtser.h"
+
+// TxBolt Codes
+#define TXB_NUL 0
+#define TXB_S_L 0b00000001
+#define TXB_T_L 0b00000010
+#define TXB_K_L 0b00000100
+#define TXB_P_L 0b00001000
+#define TXB_W_L 0b00010000
+#define TXB_H_L 0b00100000
+#define TXB_R_L 0b01000001
+#define TXB_A_L 0b01000010
+#define TXB_O_L 0b01000100
+#define TXB_STR 0b01001000
+#define TXB_E_R 0b01010000
+#define TXB_U_R 0b01100000
+#define TXB_F_R 0b10000001
+#define TXB_R_R 0b10000010
+#define TXB_P_R 0b10000100
+#define TXB_B_R 0b10001000
+#define TXB_L_R 0b10010000
+#define TXB_G_R 0b10100000
+#define TXB_T_R 0b11000001
+#define TXB_S_R 0b11000010
+#define TXB_D_R 0b11000100
+#define TXB_Z_R 0b11001000
+#define TXB_NUM 0b11010000
+
+#define TXB_GRP0 0b00000000
+#define TXB_GRP1 0b01000000
+#define TXB_GRP2 0b10000000
+#define TXB_GRP3 0b11000000
+#define TXB_GRPMASK 0b11000000
+
+#define TXB_GET_GROUP(code) ((code & TXB_GRPMASK) >> 6)
+
+#define BOLT_STATE_SIZE 4
+#define GEMINI_STATE_SIZE 6
+
+uint8_t state[MAX(BOLT_STATE_SIZE, GEMINI_STATE_SIZE)] = {0};
+uint8_t pressed = 0;
+steno_mode_t mode;
+
+uint8_t boltmap[64] = {
+  TXB_NUL, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM,
+  TXB_S_L, TXB_S_L, TXB_T_L, TXB_K_L, TXB_P_L, TXB_W_L, TXB_H_L,
+  TXB_R_L, TXB_A_L, TXB_O_L, TXB_STR, TXB_STR, TXB_NUL, TXB_NUL,
+  TXB_NUL, TXB_STR, TXB_STR, TXB_E_R, TXB_U_R, TXB_F_R, TXB_R_R,
+  TXB_P_R, TXB_B_R, TXB_L_R, TXB_G_R, TXB_T_R, TXB_S_R, TXB_D_R,
+  TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_Z_R
+};
+
+#define BOLTMAP_MASK (sizeof(boltmap) - 1)
+
+
+void steno_clear_state(void) {
+  memset(state, 0, sizeof(state));
+}
+
+void steno_init() {
+  if (!eeconfig_is_enabled()) {
+    eeconfig_init();
+  }
+  mode = eeprom_read_byte(EECONFIG_STENOMODE);
+}
+
+void steno_set_mode(steno_mode_t new_mode) {
+  steno_clear_state();
+  mode = new_mode;
+  eeprom_update_byte(EECONFIG_STENOMODE, mode);
+}
+
+void send_steno_state(uint8_t size, bool send_empty) {
+  for (uint8_t i = 0; i < size; ++i) {
+    if (state[i] || send_empty) {
+      virtser_send(state[i]);
+    }
+  }
+  steno_clear_state();
+}
+
+bool update_state_bolt(uint8_t key) {
+  uint8_t boltcode = boltmap[key];
+  state[TXB_GET_GROUP(boltcode)] |= boltcode;
+  return false;
+}
+
+bool send_state_bolt(void) {
+  send_steno_state(BOLT_STATE_SIZE, false);
+  virtser_send(0); // terminating byte
+  return false;
+}
+
+bool update_state_gemini(uint8_t key) {
+  state[key / 7] |= 1 << (6 - (key % 7));
+  return false;
+}
+
+bool send_state_gemini(void) {
+  state[0] |= 0x80; // Indicate start of packet
+  send_steno_state(GEMINI_STATE_SIZE, true);
+  return false;
+}
+
+bool process_steno(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QK_STENO_BOLT:
+      if (IS_PRESSED(record->event)) {
+        steno_set_mode(STENO_MODE_BOLT);
+      }
+      return false;
+
+    case QK_STENO_GEMINI:
+      if (IS_PRESSED(record->event)) {
+        steno_set_mode(STENO_MODE_GEMINI);
+      }
+      return false;
+
+    case STN__MIN...STN__MAX:
+      if (IS_PRESSED(record->event)) {
+        uint8_t key = keycode - QK_STENO;
+        ++pressed;
+        switch(mode) {
+          case STENO_MODE_BOLT:
+            return update_state_bolt(key);
+          case STENO_MODE_GEMINI:
+            return update_state_gemini(key);
+          default:
+            return false;
+        }
+      } else {
+        --pressed;
+        if (pressed <= 0) {
+          pressed = 0;
+          switch(mode) {
+            case STENO_MODE_BOLT:
+              return send_state_bolt();
+            case STENO_MODE_GEMINI:
+              return send_state_gemini();
+            default:
+              return false;
+          }
+        }
+      }
+
+  }
+  return true;
+}
diff --git a/quantum/process_keycode/process_steno.h b/quantum/process_keycode/process_steno.h
new file mode 100644 (file)
index 0000000..3bbcbea
--- /dev/null
@@ -0,0 +1,31 @@
+/* Copyright 2017 Joseph Wasson
+ *
+ * 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 PROCESS_STENO_H
+#define PROCESS_STENO_H
+
+#include "quantum.h"
+
+#if defined(STENO_ENABLE) && !defined(VIRTSER_ENABLE)
+  #error "must have virtser enabled to use steno"
+#endif
+
+typedef enum { STENO_MODE_BOLT, STENO_MODE_GEMINI } steno_mode_t;
+
+bool process_steno(uint16_t keycode, keyrecord_t *record);
+void steno_init(void);
+void steno_set_mode(steno_mode_t mode);
+
+#endif
\ No newline at end of file
index b76a1141868b2ee41aa9a56c2a3daa672c2f2624..1f8ce6c46f52464817f37f5777256c8d27a75428 100644 (file)
@@ -200,6 +200,9 @@ bool process_record_quantum(keyrecord_t *record) {
   #ifdef AUDIO_ENABLE
     process_audio(keycode, record) &&
   #endif
+  #ifdef STENO_ENABLE
+    process_steno(keycode, record) &&
+  #endif
   #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
     process_music(keycode, record) &&
   #endif
@@ -722,14 +725,14 @@ void backlight_set(uint8_t level)
       //   _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
       // #endif
     #endif
-  } 
+  }
   #ifndef NO_BACKLIGHT_CLOCK
     else if ( level == BACKLIGHT_LEVELS ) {
       // Turn on PWM control of backlight pin
       TCCR1A |= _BV(COM1x1);
       // Set the brightness
       OCR1x = 0xFFFF;
-    } 
+    }
     else {
       // Turn on PWM control of backlight pin
       TCCR1A |= _BV(COM1x1);
@@ -747,7 +750,7 @@ uint8_t backlight_tick = 0;
 
 void backlight_task(void) {
   #ifdef NO_BACKLIGHT_CLOCK
-  if ((0xFFFF >> ((BACKLIGHT_LEVELS - backlight_config.level) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { 
+  if ((0xFFFF >> ((BACKLIGHT_LEVELS - backlight_config.level) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) {
     #if BACKLIGHT_ON_STATE == 0
       // PORTx &= ~n
       _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
index 6c0e465732ea313e5b6383c4f002496aa40b8389..453cb43f88af863e02c12ca87072b2cbee586f8b 100644 (file)
@@ -60,6 +60,10 @@ extern uint32_t default_layer_state;
        #include "process_audio.h"
 #endif
 
+#ifdef STENO_ENABLE
+       #include "process_steno.h"
+#endif
+
 #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
        #include "process_music.h"
 #endif
index 06ab6d18db655c562807ab49f0e7c831f50080b9..acdb9248d60ae4f419bf3ec52567cf7a89e44848 100644 (file)
@@ -71,6 +71,12 @@ enum quantum_keycodes {
     QK_TAP_DANCE_MAX      = 0x57FF,
     QK_LAYER_TAP_TOGGLE   = 0x5800,
     QK_LAYER_TAP_TOGGLE_MAX = 0x58FF,
+#ifdef STENO_ENABLE
+    QK_STENO              = 0x5A00,
+    QK_STENO_BOLT         = 0x5A30,
+    QK_STENO_GEMINI       = 0x5A31,
+    QK_STENO_MAX          = 0x5A3F,
+#endif
     QK_MOD_TAP            = 0x6000,
     QK_MOD_TAP_MAX        = 0x7FFF,
 #if defined(UNICODEMAP_ENABLE) && defined(UNICODE_ENABLE)
index 140d2b85bb9f2857af85bd57731459506e8dc0c6..e2eb4a38e3d21e6629f0dd71204b3737587df9a0 100644 (file)
@@ -19,6 +19,9 @@ void eeconfig_init(void)
 #ifdef RGBLIGHT_ENABLE
     eeprom_update_dword(EECONFIG_RGBLIGHT,      0);
 #endif
+#ifdef STENO_ENABLE
+    eeprom_update_byte(EECONFIG_STENOMODE,      0);
+#endif
 }
 
 void eeconfig_enable(void)
index 280dc7ab67e7bf8fe2e94f1affd8d67d79931a5b..ce60ca86615cd1df35eee18d4897734f7c219b0d 100644 (file)
@@ -34,6 +34,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define EECONFIG_AUDIO                              (uint8_t *)7
 #define EECONFIG_RGBLIGHT                           (uint32_t *)8
 #define EECONFIG_UNICODEMODE                        (uint8_t *)12
+#define EECONFIG_STENOMODE                          (uint8_t *)13
 
 
 /* debug bit */
index 97a8f1cd8c4e2f88086cbaab490a51b58ecd5cc9..9466e10e2d412d1b4f50aa966a33093a3dc10f2c 100644 (file)
@@ -51,6 +51,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #ifdef RGBLIGHT_ENABLE
 #   include "rgblight.h"
 #endif
+#ifdef STENO_ENABLE
+#   include "process_steno.h"
+#endif
 #ifdef FAUXCLICKY_ENABLE
 #   include "fauxclicky.h"
 #endif
@@ -139,6 +142,9 @@ void keyboard_init(void) {
 #ifdef RGBLIGHT_ENABLE
     rgblight_init();
 #endif
+#ifdef STENO_ENABLE
+    steno_init();
+#endif
 #ifdef FAUXCLICKY_ENABLE
     fauxclicky_init();
 #endif