Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Richard Baptist 2019-08-08 10:21:58 +02:00
commit 9abbf71353
No known key found for this signature in database
GPG Key ID: 115D8B1815981F35
851 changed files with 20445 additions and 3750 deletions

View File

@ -38,7 +38,7 @@ with open('requirements.txt', 'r') as fd:
# Figure out our version # Figure out our version
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags'] command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
result = subprocess.run(command, text=True, capture_output=True) result = subprocess.run(command, universal_newlines=True, capture_output=True)
if result.returncode == 0: if result.returncode == 0:
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip() os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()

View File

@ -89,7 +89,7 @@ This is a C header file that is one of the first things included, and will persi
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
* `#define LOCKING_RESYNC_ENABLE` * `#define LOCKING_RESYNC_ENABLE`
* tries to keep switch state consistent with keyboard LED state * tries to keep switch state consistent with keyboard LED state
* `#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))` * `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)`
* key combination that allows the use of magic commands (useful for debugging) * key combination that allows the use of magic commands (useful for debugging)
* `#define USB_MAX_POWER_CONSUMPTION` * `#define USB_MAX_POWER_CONSUMPTION`
* sets the maximum power (in mA) over USB for the device (default: 500) * sets the maximum power (in mA) over USB for the device (default: 500)
@ -248,6 +248,9 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }` * `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns. * If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
* If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`.
* `#define RGBLED_SPLIT { 6, 6 }` * `#define RGBLED_SPLIT { 6, 6 }`
* See [RGB Light Configuration](#rgb-light-configuration) * See [RGB Light Configuration](#rgb-light-configuration)

View File

@ -19,7 +19,11 @@ Note that running `make` with `sudo` is generally ***not*** a good idea, and you
### Linux `udev` Rules ### Linux `udev` Rules
On Linux, you'll need proper privileges to access the MCU. You can either use On Linux, you'll need proper privileges to access the MCU. You can either use
`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. `sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following:
```console
sudo udevadm control --reload-rules
sudo udevadm trigger
```
**/etc/udev/rules.d/50-atmel-dfu.rules:** **/etc/udev/rules.d/50-atmel-dfu.rules:**
``` ```
@ -43,21 +47,41 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
``` ```
**/etc/udev/rules.d/55-catalina.rules:**
```
# ModemManager should ignore the following devices
ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"
```
**Note:** ModemManager filtering only works when not in strict mode, the following commands can update that settings:
```console
sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service
sudo systemctl daemon-reload
sudo systemctl restart ModemManager
```
**/etc/udev/rules.d/56-dfu-util.rules:**
```
# stm32duino
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666"
# Generic stm32
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"
```
### Serial device is not detected in bootloader mode on Linux ### Serial device is not detected in bootloader mode on Linux
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options. Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
## Unknown Device for DFU Bootloader ## Unknown Device for DFU Bootloader
If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue. Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader.
Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. Re-running the installation script for MSYS2 may help (eg run `util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package.
If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUSB` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. If that doesn't work, try all of the options, until one works. If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, and run it on the system. Then, you will need to reset your board into bootloader mode. After that, locate the device in question. If the device doesn't show up in the list (or nothing shows up in the list), you may need to enable the `List all devices` option in the `Options` menu.
?> There isn't a best option for which driver should be used here. Some options work better on some systems than others. libUSB and WinUSB seem to be the best options here. From here, you will need to know what type of controller the board is using. You may see it listed in the Device Manager as `ATmega32U4` device (which is an AVR board), or an `STM32` device (Which is an ARM board). For AVR boards, use `libusb-win32` for the driver. For ARM boards, use the `WinUSB` driver. Once the correct driver type has been selected, click on the `Replace Driver` button, unplug your board, plug it back in, and reset it again.
If the bootloader doesn't show up in the list for devices, you may need to enable the "List all devices" option in the `Options` menu, and then find the bootloader in question.
## WINAVR is Obsolete ## WINAVR is Obsolete

View File

@ -73,8 +73,10 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`:
## Backlight On State ## Backlight On State
Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *low*. Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*.
Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case you must `#define BACKLIGHT_ON_STATE 1`, so that when the transistor is on, the pin is driven *high* instead. Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead.
This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define.
## Multiple backlight pins ## Multiple backlight pins

View File

@ -16,36 +16,36 @@ To use Command, hold down the key combination defined by the `IS_COMMAND()` macr
If you would like to change the key assignments for Command, `#define` these in your `config.h` at either the keyboard or keymap level. All keycode assignments here must omit the `KC_` prefix. If you would like to change the key assignments for Command, `#define` these in your `config.h` at either the keyboard or keymap level. All keycode assignments here must omit the `KC_` prefix.
|Define |Default |Description | |Define |Default |Description |
|------------------------------------|---------------------------------------------------------------------------|------------------------------------------------| |------------------------------------|--------------------------------|------------------------------------------------|
|`IS_COMMAND()` |<code>(get_mods() == (MOD_BIT(KC_LSHIFT) &#124; MOD_BIT(KC_RSHIFT)))</code>|The key combination to activate Command | |`IS_COMMAND()` |`(get_mods() == MOD_MASK_SHIFT)`|The key combination to activate Command |
|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row | |`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row |
|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys | |`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys |
|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` | |`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` |
|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial | |`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial |
|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging | |`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging |
|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging | |`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging |
|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging | |`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging |
|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console | |`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console |
|`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console | |`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console |
|`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console| |`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console|
|`MAGIC_KEY_HELP` |`H` |Print Command help to the console | |`MAGIC_KEY_HELP` |`H` |Print Command help to the console |
|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) | |`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) |
|`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer | |`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer |
|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) | |`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) |
|`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer | |`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer |
|`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer | |`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer |
|`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer | |`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer |
|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer | |`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer |
|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer | |`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer |
|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer | |`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer |
|`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer | |`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer |
|`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer | |`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer |
|`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer | |`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer |
|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader | |`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader |
|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) | |`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) |
|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed | |`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed |
|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console | |`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console |
|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM | |`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM |
|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) | |`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) |
|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping | |`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping |

View File

@ -160,6 +160,11 @@ There are some settings that you may need to configure, based on how the hardwar
This allows you to specify a different set of pins for the matrix on the right side. This is useful if you have a board with differently-shaped halves that requires a different configuration (such as Keebio's Quefrency). This allows you to specify a different set of pins for the matrix on the right side. This is useful if you have a board with differently-shaped halves that requires a different configuration (such as Keebio's Quefrency).
```c
#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }
```
This allows you to specify a different set of direct pins for the right side.
```c ```c
#define RGBLIGHT_SPLIT #define RGBLIGHT_SPLIT

View File

@ -1,22 +1,33 @@
# Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things # Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things
<!-- FIXME: Break this up into multiple sections --> ## Introduction
Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature: Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature:
With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter.
To make it clear how this is different from `ACTION_FUNCTION_TAP`, let's explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap. ## Explanatory Comparison with `ACTION_FUNCTION_TAP`
`ACTION_FUNCTION_TAP` can offer similar functionality to Tap Dance, but it's worth noting some important differences. To do this, let's explore a certain setup! We want one key to send `Space` on single-tap, but `Enter` on double-tap.
With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly. With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if `SPC` and `a` are both typed within `TAPPING_TERM`. With the Tap Dance feature, that'll come out correctly as `SPC a` (even if both `SPC` and `a` are typed within the `TAPPING_TERM`.
The implementation hooks into two parts of the system, to achieve this: into `process_record_quantum()`, and the matrix scan. We need the latter to be able to time out a tap sequence even when a key is not being pressed, so `SPC` alone will time out and register after `TAPPING_TERM` time. To achieve this correct handling of interrupts, the implementation of Tap Dance hooks into two parts of the system: `process_record_quantum()`, and the matrix scan. These two parts are explained below, but for now the point to note is that we need the latter to be able to time out a tap sequence even when a key is not being pressed. That way, `SPC` alone will time out and register after `TAPPING_TERM` time.
But lets start with how to use it, first! ## How to Use Tap Dance
But enough of the generalities; lets look at how to actually use Tap Dance!
First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array. First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size.
This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options: Optionally, you might want to set a custom `TAPPING_TERM` time by adding something like this in you `config.h`:
```
#define TAPPING_TERM 175
```
The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead.
Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()` - takes a number, which will later be used as an index into the `tap_dance_actions` array.
After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options:
* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held.
* `ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode). * `ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode).
@ -28,13 +39,18 @@ The first option is enough for a lot of cases, that just want dual roles. For ex
!> Keep in mind that only [basic keycodes](keycodes_basic.md) are supported here. Custom keycodes are not supported. !> Keep in mind that only [basic keycodes](keycodes_basic.md) are supported here. Custom keycodes are not supported.
And that's the bulk of it! Similar to the first option, the second option is good for simple layer-switching cases.
And now, on to the explanation of how it works! For more complicated cases, use the third or fourth options (examples of each are listed below).
The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and the timer. Finally, the fifth option is particularly useful if your non-Tap-Dance keys start behaving weirdly after adding the code for your Tap Dance keys. The likely problem is that you changed the `TAPPING_TERM` time to make your Tap Dance keys easier for you to use, and that this has changed the way your other keys handle interrupts.
This means that you have `TAPPING_TERM` time to tap the key again, you do not have to input all the taps within that timeframe. This allows for longer tap counts, with minimal impact on responsiveness. ## Implementation Details
Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works!
The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and reset the timer.
This means that you have `TAPPING_TERM` time to tap the key again; you do not have to input all the taps within a single `TAPPING_TERM` timeframe. This allows for longer tap counts, with minimal impact on responsiveness.
Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys. Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys.
@ -397,3 +413,111 @@ qk_tap_dance_action_t tap_dance_actions[] = {
``` ```
Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`. Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`.
### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys
Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this example, we will set up a key to function as `KC_QUOT` on single-tap, as `MO(_MY_LAYER)` on single-hold, and `TG(_MY_LAYER)` on double-tap.
The first step is to include the following code towards the beginning of your `keymap.c`:
```
typedef struct {
bool is_press_action;
int state;
} tap;
//Define a type for as many tap dance states as you need
enum {
SINGLE_TAP = 1,
SINGLE_HOLD = 2,
DOUBLE_TAP = 3
};
enum {
QUOT_LAYR = 0 //Our custom tap dance key; add any other tap dance keys to this enum
};
//Declare the functions to be used with your tap dance key(s)
//Function associated with all tap dances
int cur_dance (qk_tap_dance_state_t *state);
//Functions associated with individual tap dances
void ql_finished (qk_tap_dance_state_t *state, void *user_data);
void ql_reset (qk_tap_dance_state_t *state, void *user_data);
//Declare variable to track which layer is active
int active_layer;
```
The above code is similar to that used in previous examples. The one point to note is that you need to declare a variable to keep track of what layer is currently the active layer. We'll see why shortly.
Towards the bottom of your `keymap.c`, include the following code:
```
//Update active_layer
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case 1:
active_layer = 1;
break;
case 2:
active_layer = 2;
break;
case 3:
active_layer = 3;
break;
default:
active_layer = 0;
break;
}
return state;
}
//Determine the current tap dance state
int cur_dance (qk_tap_dance_state_t *state) {
if (state->count == 1) {
if (!state->pressed) {return SINGLE_TAP;}
else return SINGLE_HOLD;
} else if (state->count == 2) {return DOUBLE_TAP;}
else return 8;
}
//Initialize tap structure associated with example tap dance key
static tap ql_tap_state = {
.is_press_action = true,
.state = 0
};
//Functions that control what our tap dance key does
void ql_finished (qk_tap_dance_state_t *state, void *user_data) {
ql_tap_state.state = cur_dance(state);
switch (ql_tap_state.state) {
case SINGLE_TAP: tap_code(KC_QUOT); break;
case SINGLE_HOLD: layer_on(_MY_LAYER); break;
case DOUBLE_TAP:
if (active_layer==_MY_LAYER) {layer_off(_MY_LAYER);}
else layer_on(_MY_LAYER);
}
}
void ql_reset (qk_tap_dance_state_t *state, void *user_data) {
if (ql_tap_state.state==SINGLE_HOLD) {layer_off(_MY_LAYER);}
ql_tap_state.state = 0;
}
//Associate our tap dance key with its functionality
qk_tap_dance_action_t tap_dance_actions[] = {
[QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275)
};
```
The is where the real logic of our tap dance key gets worked out. Since `layer_state_set_user()` is called on any layer switch, we use it to update `active_layer`. Our example is assuming that your `keymap.c` includes 4 layers, so adjust the switch statement here to fit your actual number of layers.
The use of `cur_dance()` and `ql_tap_state` mirrors the above examples.
The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `case:SINGLE_HOLD` works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `case:DOUBLE_TAP` works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`.
`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here.
Finally, to get this tap dance key working, be sure to include `TD(QUOT_LAYR)` in your `keymaps[]`.

View File

@ -4,7 +4,7 @@ The [QMK Configurator](https://config.qmk.fm) is an online graphical user interf
?> **Please follow these steps in order.** ?> **Please follow these steps in order.**
Watch the [Video Tutorial](https://youtu.be/7RH-1pAbjvw) Watch the [Video Tutorial](https://youtu.be/tx54jkRC9ZY)
The QMK Configurator works best with Chrome/Firefox. The QMK Configurator works best with Chrome/Firefox.

View File

@ -223,7 +223,7 @@ For the PJRC devices (Teensy's), when you're ready to compile and flash your fir
For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command: For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command:
make erdogox_ez:xyverz:teensy make ergodox_ez:xyverz:teensy
Once the firmware finishes compiling, it will output something like this: Once the firmware finishes compiling, it will output something like this:

View File

@ -71,10 +71,10 @@ uint8_t g_twi_transfer_buffer[20];
// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's // buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's
// probably not worth the extra complexity. // probably not worth the extra complexity.
uint8_t g_pwm_buffer[DRIVER_COUNT][144]; uint8_t g_pwm_buffer[DRIVER_COUNT][144];
bool g_pwm_buffer_update_required = false; bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false };
uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } }; uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } };
bool g_led_control_registers_update_required = false; bool g_led_control_registers_update_required[DRIVER_COUNT] = { false };
// This is the bit pattern in the LED control registers // This is the bit pattern in the LED control registers
// (for matrix A, add one to register for matrix B) // (for matrix A, add one to register for matrix B)
@ -204,7 +204,7 @@ void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
g_pwm_buffer[led.driver][led.r - 0x24] = red; g_pwm_buffer[led.driver][led.r - 0x24] = red;
g_pwm_buffer[led.driver][led.g - 0x24] = green; g_pwm_buffer[led.driver][led.g - 0x24] = green;
g_pwm_buffer[led.driver][led.b - 0x24] = blue; g_pwm_buffer[led.driver][led.b - 0x24] = blue;
g_pwm_buffer_update_required = true; g_pwm_buffer_update_required[led.driver] = true;
} }
} }
@ -220,12 +220,12 @@ void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, b
{ {
is31_led led = g_is31_leds[index]; is31_led led = g_is31_leds[index];
uint8_t control_register_r = (led.r - 0x24) / 8; uint8_t control_register_r = (led.r - 0x24) / 8;
uint8_t control_register_g = (led.g - 0x24) / 8; uint8_t control_register_g = (led.g - 0x24) / 8;
uint8_t control_register_b = (led.b - 0x24) / 8; uint8_t control_register_b = (led.b - 0x24) / 8;
uint8_t bit_r = (led.r - 0x24) % 8; uint8_t bit_r = (led.r - 0x24) % 8;
uint8_t bit_g = (led.g - 0x24) % 8; uint8_t bit_g = (led.g - 0x24) % 8;
uint8_t bit_b = (led.b - 0x24) % 8; uint8_t bit_b = (led.b - 0x24) % 8;
if ( red ) { if ( red ) {
g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r);
@ -243,28 +243,26 @@ void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, b
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
} }
g_led_control_registers_update_required = true; g_led_control_registers_update_required[led.driver] = true;
} }
void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) void IS31FL3731_update_pwm_buffers( uint8_t addr, uint8_t index )
{ {
if ( g_pwm_buffer_update_required ) if ( g_pwm_buffer_update_required[index] )
{ {
IS31FL3731_write_pwm_buffer( addr1, g_pwm_buffer[0] ); IS31FL3731_write_pwm_buffer( addr, g_pwm_buffer[index] );
IS31FL3731_write_pwm_buffer( addr2, g_pwm_buffer[1] );
} }
g_pwm_buffer_update_required = false; g_pwm_buffer_update_required[index] = false;
} }
void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) void IS31FL3731_update_led_control_registers( uint8_t addr, uint8_t index )
{ {
if ( g_led_control_registers_update_required ) if ( g_led_control_registers_update_required[index] )
{ {
for ( int i=0; i<18; i++ ) for ( int i=0; i<18; i++ )
{ {
IS31FL3731_write_register(addr1, i, g_led_control_registers[0][i] ); IS31FL3731_write_register( addr, i, g_led_control_registers[index][i] );
IS31FL3731_write_register(addr2, i, g_led_control_registers[1][i] );
} }
} }
} }

View File

@ -44,8 +44,8 @@ void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, b
// (eg. from a timer interrupt). // (eg. from a timer interrupt).
// Call this while idle (in between matrix scans). // Call this while idle (in between matrix scans).
// If the buffer is dirty, it will update the driver with the buffer. // If the buffer is dirty, it will update the driver with the buffer.
void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); void IS31FL3731_update_pwm_buffers( uint8_t addr, uint8_t index );
void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); void IS31FL3731_update_led_control_registers( uint8_t addr, uint8_t index );
#define C1_1 0x24 #define C1_1 0x24
#define C1_2 0x25 #define C1_2 0x25

View File

@ -321,7 +321,7 @@ void oled_render(void) {
// Send render data chunk after rotating // Send render data chunk after rotating
if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
print("oled_render data failed\n"); print("oled_render90 data failed\n");
return; return;
} }
} }
@ -393,6 +393,11 @@ void oled_write_char(const char data, bool invert) {
return; return;
} }
if (data == '\r') {
oled_advance_page(false);
return;
}
// copy the current render buffer to check for dirty after // copy the current render buffer to check for dirty after
static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; static uint8_t oled_temp_buffer[OLED_FONT_WIDTH];
memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH);

View File

@ -17,6 +17,19 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
* |-----------------------------------------------------------------------------------------+
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
* |-----------------------------------------------------------------------------------------+
* | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
* |-----------------------------------------------------------------------------------------+
* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift |
* |-----------------------------------------------------------------------------------------+
* | Ctrl | GUI | Alt | Space | Alt | GUI | L1 | Ctrl |
* `-----------------------------------------------------------------------------------------'
*/
[0] = LAYOUT_60_ansi( [0] = LAYOUT_60_ansi(
KC_ESC, 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_ESC, 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_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_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,
@ -25,6 +38,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL
), ),
/* Function
* ,-----------------------------------------------------------------------------------------.
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
* |-----------------------------------------------------------------------------------------+
* | | | Up | | | | | | | |PrtSc|ScrLk|Pause| |
* |-----------------------------------------------------------------------------------------+
* | |Left |Down |Right| | | | | | Ins |Home |PgUp | |
* |-----------------------------------------------------------------------------------------+
* | |VolUp|VolDn|VolMu| | | | | | End |PgDn | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | L2 | | |
* `-----------------------------------------------------------------------------------------'
*/
[1] = LAYOUT_60_ansi( [1] = LAYOUT_60_ansi(
KC_GRV, 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_DEL, KC_GRV, 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_DEL,
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS,
@ -33,6 +59,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS
), ),
/* RGB
* ,-----------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | Reset |
* |-----------------------------------------------------------------------------------------+
* | BL Tog |BLInc|BLDec|BLStp| | | | | | | | | | |
* |-----------------------------------------------------------------------------------------+
* | RGB Tog |Mode |Hue I|Sat I|Val I|Spd I|Plain|Breat|Rnbow|Swirl| | | |
* |-----------------------------------------------------------------------------------------+
* | |RMode|Hue D|Sat D|Val D|Spd D|Snake|Knigh|Xmas |Gradi| | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | |
* `-----------------------------------------------------------------------------------------'
*/
[2] = LAYOUT_60_ansi( [2] = LAYOUT_60_ansi(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,

View File

@ -0,0 +1,19 @@
/* Copyright 2018 Chuck "@vosechu" Lauer Vose
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@ -0,0 +1,46 @@
/* Copyright 2018 Chuck "@vosechu" Lauer Vose
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#define SPACEFN LT(1, KC_SPC)
#define CTL_GRV CTL_T(KC_GRV)
#define ALT_TAB ALT_T(KC_TAB)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi(
KC_ESC , 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_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_CAPS , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , KC_ENT ,
KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT ,
CTL_GRV , ALT_TAB , KC_LGUI , SPACEFN , KC_RALT , KC_RGUI , MO(1) , KC_RCTL
),
[1] = LAYOUT_60_ansi(
KC_GRV , 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_DEL ,
KC_TRNS , KC_TRNS , KC_UP , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_PSCR , KC_SLCK , KC_PAUS , KC_TRNS ,
KC_TRNS , KC_LEFT , KC_DOWN , KC_RGHT , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_INS , KC_HOME , KC_PGUP , KC_TRNS ,
KC_TRNS , KC_VOLU , KC_VOLD , KC_MUTE , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_END , KC_PGDN , KC_TRNS ,
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , MO(2) , KC_TRNS , KC_TRNS
),
[2] = LAYOUT_60_ansi(
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 ,
BL_TOGG , BL_INC , BL_DEC , BL_STEP , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS ,
RGB_TOG , RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , RGB_SPI , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , KC_TRNS , KC_TRNS , KC_TRNS ,
KC_TRNS , RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , RGB_SPD , RGB_M_SN , RGB_M_K , RGB_M_X , RGB_M_G , KC_TRNS , KC_TRNS ,
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS
)
};

View File

@ -0,0 +1,6 @@
# 1up60hse keymap made by vosechu
Tweaks from default
* Add in SpaceFN so arrows are reachable with just left hand (leaving right free for mousing).
* Also add tab/grv under the alt/ctrl keys to make those easier to reach.

16
keyboards/2_milk/2_milk.c Normal file
View File

@ -0,0 +1,16 @@
/* Copyright 2019 Sebastian Williams
*
* 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 "2_milk.h"

26
keyboards/2_milk/2_milk.h Normal file
View File

@ -0,0 +1,26 @@
/* Copyright 2019 Sebastian Williams
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
#define LAYOUT( \
K00, \
K01 \
) { \
{ K00 }, \
{ K01 } \
}

41
keyboards/2_milk/config.h Normal file
View File

@ -0,0 +1,41 @@
/* Copyright 2019 Sebastian Williams
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0xB195
#define DEVICE_VER 0x0001
#define MANUFACTURER rionlion100
#define PRODUCT 2% Milk
#define DESCRIPTION A milk themed 2% Keyboard
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 1
/* Milk default pinout */
#define DIRECT_PINS { \
{D4}, \
{C6} \
}
#define UNUSED_PINS
#ifdef RGBLIGHT_ENABLE
#define RGB_DI_PIN B6
#define RGBLED_NUM 1
#endif

View File

@ -0,0 +1,15 @@
{
"keyboard_name": "2% Milk",
"keyboard_folder": "2_milk",
"url": "",
"maintainer": "rionlion100",
"width": 1,
"height": 2,
"layouts": {
"LAYOUT": {
"key_count": 2,
"layout": [ {"x": 0, "y": 0 }, {"x": 0, "y": 1 }]
}
}
}

View File

@ -0,0 +1,8 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_P0,
KC_P1
)
};

View File

@ -0,0 +1,2 @@
# Binary keymap
0 and 1 that's it

View File

@ -0,0 +1,9 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
RCTL(KC_C),
RCTL(KC_V)
)
};

View File

@ -0,0 +1,2 @@
# Copy/Paste Keymap
![Picture](https://i.imgur.com/7LMZZrL.png)

View File

@ -0,0 +1,8 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_Z,
KC_X
)
};

View File

@ -0,0 +1,2 @@
# Default keymap for 2% Milk
![Picture](https://i.imgur.com/9PsZ6wa.png)

View File

@ -0,0 +1,31 @@
#include QMK_KEYBOARD_H
enum custom_keycodes {
DISSA,
SHRUG
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
SHRUG,
DISSA
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case SHRUG:
if (record->event.pressed) {
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
} else {
}
break;
case DISSA:
if (record->event.pressed) {
send_unicode_hex_string("0CA0 005F 0CA0");
} else {
}
break;
}
return true;
};

View File

@ -0,0 +1,2 @@
# Emoji Keymap
![Picture](https://i.imgur.com/1zEZ9Lq.png)

View File

@ -0,0 +1,8 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_LGUI,
KC_F11
)
};

View File

@ -0,0 +1,2 @@
# ExcessBread's keymap
requested by excessbread

View File

@ -0,0 +1,8 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_BTN1,
KC_BTN2
)
};

View File

@ -0,0 +1,2 @@
# left and right mouse buttons
requested by WanderingVagrant

View File

@ -0,0 +1,19 @@
# 2% Milk
![2%Milk](https://i.imgur.com/Ud96uXn.png)
A 2% Meme board themed around a milk carton
Keyboard Maintainer: [Rionlion100](https://github.com/rionlion100)
Hardware Availability: [Open Source](https://github.com/Rionlion100/Spaceboards/tree/master/Keyboards/2%25%20Milk)
Make example for this keyboard (after setting up your build environment):
make 2_milk:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
### Credits
+ Case design by Soft
+ PCB by PyroL
+ Name by jetpacktuxedo

34
keyboards/2_milk/rules.mk Normal file
View File

@ -0,0 +1,34 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
F_USB = $(F_CPU)
# Bootloader
BOOTLOADER = caterina
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled
AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below
RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port.

View File

@ -1,7 +1,5 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below. // 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. // 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 // Layer names don't all need to be of the same length, obviously, and you can also skip them
@ -15,18 +13,18 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_60_ansi( [_BASE] = LAYOUT_60_ansi(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , KC_RGUI , MO(_FN1) , KC_RCTL KC_LCTL, KC_LGUI, KC_LALT , KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL
), ),
[_FN1] = LAYOUT_60_ansi( [_FN1] = LAYOUT_60_ansi(
KC_GESC, 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_BSPC, \ KC_GESC, 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_BSPC,
RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_GRV, _______, _______, _______, _______, _______, _______, _______ KC_GRV, _______, _______, _______, _______, _______, _______, _______
) )
}; };

View File

@ -0,0 +1,6 @@
#undef RGBLED_NUM
#define RGBLED_NUM 16
#define QMK_ESC_OUTPUT F4
#define QMK_ESC_INPUT D3
#define QMK_LED B0

View File

@ -0,0 +1,30 @@
#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BASE 0
#define _FN1 1
enum custom_keycodes {
QWERTY = SAFE_RANGE,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_60_ansi(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT , KC_SPC, KC_RALT, KC_APP, MO(_FN1), KC_RCTL
),
[_FN1] = LAYOUT_60_ansi(
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_GRV, _______, _______, _______, _______, KC_RGUI, _______, _______
)
};

View File

@ -0,0 +1 @@
BOOTLOADER = qmk-dfu

View File

@ -3,7 +3,7 @@
#include "quantum.h" #include "quantum.h"
#define LAYOUT_60_ansi( \ #define LAYOUT_60_ansi( \
K00, K01, K02, K03, K04, K05, K06, K07, K10, K11, K12, K13, K14, K15, \ K00, K01, K02, K03, K04, K05, K06, K07, K10, K11, K12, K13, K14, K15, \
K16, K17, K20, K21, K22, K23, K24, K25, K26, K27, K30, K31, K32, K33, \ K16, K17, K20, K21, K22, K23, K24, K25, K26, K27, K30, K31, K32, K33, \
K34, K35, K36, K37, K40, K41, K42, K43, K44, K45, K46, K47, K50, \ K34, K35, K36, K37, K40, K41, K42, K43, K44, K45, K46, K47, K50, \
K51, K52, K53, K54, K55, K56, K57, K60, K61, K62, K63, K64, \ K51, K52, K53, K54, K55, K56, K57, K60, K61, K62, K63, K64, \
@ -18,4 +18,3 @@
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \ { K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K70, K71, K72, K73, K74 }, \ { K70, K71, K72, K73, K74 }, \
} }

View File

@ -0,0 +1,52 @@
#include QMK_KEYBOARD_H
// Helpful defines
#define ESC_CTL CTL_T(KC_ESCAPE) // Tap for Esc, hold for Ctrl
#define FL_KCF LT(1,KC_F)
#define FL_KCJ LT(1,KC_J)
#define CMD_ENT LGUI(LSFT(KC_ENT))
enum custom_keycodes {
HASHRKT = SAFE_RANGE,
CLNEQLS,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* Base */
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_BSLS, KC_BSLS, LGUI(KC_C),
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, LGUI(KC_V),
ESC_CTL, KC_A, KC_S, KC_D, FL_KCF, KC_G, KC_H, FL_KCJ, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN,
CMD_ENT, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, MO(2), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT( /* FL */
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_DEL, KC_DEL, KC_VOLU,
_______, HASHRKT, _______, KC_LCBR, KC_RCBR, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, _______, _______, _______, _______, KC_VOLD,
_______, CLNEQLS, _______, KC_LBRC, KC_RBRC, _______, _______, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_GRV, _______, KC_HOME,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT( /* FN */
RESET, 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_DEL, KC_DEL, _______,
KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______,
_______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case HASHRKT:
if (record->event.pressed) {
SEND_STRING("=>");
}
break;
case CLNEQLS:
if (record->event.pressed) {
SEND_STRING(":=");
}
break;
}
return true;
}

View File

@ -0,0 +1,5 @@
# muzfuz's keymap for Lunar
```shell
make ai03/lunar:muzfuz:dfu
```

View File

@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT_ID 0x6060 #define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER AKB #define MANUFACTURER AKB
#define PRODUCT Raine M3 #define PRODUCT Raine
#define DESCRIPTION Raine M3 #define DESCRIPTION Raine
/* key matrix size */ /* key matrix size */
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5

View File

@ -68,10 +68,12 @@
{ "label": "2", "x": 14.25, "y": 3 }, { "label": "2", "x": 14.25, "y": 3 },
{ "label": "3", "x": 15.25, "y": 3 }, { "label": "3", "x": 15.25, "y": 3 },
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
{ "label": "Win", "x": 1.25, "y": 4},
{ "label": "Alt", "x": 2.25, "y": 4, "w": 1.25 }, { "label": "Alt", "x": 2.25, "y": 4, "w": 1.25 },
{ "label": "SPLEFT", "x": 3.5, "y": 4, "w": 2.25 }, { "label": "SPLEFT", "x": 3.5, "y": 4, "w": 2.25 },
{ "label": "7U", "x": 5.75, "y": 4 }, { "label": "7U", "x": 5.75, "y": 4 },
{ "label": "SPRIGHT", "x": 6.75, "y": 4, "w": 1.75 }, { "label": "SPRIGHT", "x": 6.75, "y": 4, "w": 1.75 },
{ "label": "alt", "x": 8.5, "y": 4},
{ "label": "Menu", "x": 9.5, "y": 4, "w": 1.25 }, { "label": "Menu", "x": 9.5, "y": 4, "w": 1.25 },
{ "x": 11, "y": 4.25 }, { "x": 11, "y": 4.25 },
{ "x": 12, "y": 4.25 }, { "x": 12, "y": 4.25 },

View File

@ -17,16 +17,16 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* Base */ [0] = LAYOUT( /* Base */
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_NLCK, KC_SLCK, KC_INS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_PSLS, KC_PAST, KC_PPLS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P7, KC_P8, KC_P9,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,
KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_DEL), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_BSPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
[1] = LAYOUT( /* Second */ [1] = LAYOUT( /* Second */
KC_GRV, 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_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_DEL, KC_NLCK, KC_PSCR, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_HOME, KC_UP, KC_PGUP,
_______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, KC_LEFT, KC_SLCK, KC_RGHT,
_______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, _______, KC_END, KC_DOWN, KC_PGDN,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET),
}; };

View File

@ -23,11 +23,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, K114, K115, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, K114, K115, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, K312, K313, K314, K315, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, K312, K313, K314, K315, \
K400, K402, K404, K405, K407, K409, K410, K412, K413, K414, K415 \ K400, K401, K402, K404, K405, K407, K408, K409, K410, K412, K413, K414, K415 \
) { \ ) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113, K114, K115 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113, K114, K115 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, KC_NO, K312, K313, K314, K315 }, \ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, KC_NO, K312, K313, K314, K315 }, \
{ K400, KC_NO, K402, KC_NO, K404, K405, KC_NO, K407, KC_NO, K409, K410, KC_NO, K412, K413, K414, K415 } \ { K400, K401, K402, KC_NO, K404, K405, KC_NO, K407, K408, K409, K410, KC_NO, K412, K413, K414, K415 } \
} }

View File

@ -1,103 +1,112 @@
{ {
"keyboard_name": "QMK80", "keyboard_name": "x11",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "qmk",
"width": 18.25, "width": 18.25,
"height": 6.5, "height": 6.5,
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"key_count": 88, "key_count": 88,
"layout": [ "layout": [
{"label":"K00", "x":0, "y":0}, {"label":"K00", "x":0, "y":0},
{"label":"K01", "x":2, "y":0}, {"label":"K01", "x":2, "y":0},
{"label":"K02", "x":3, "y":0}, {"label":"K02", "x":3, "y":0},
{"label":"K03", "x":4, "y":0}, {"label":"K03", "x":4, "y":0},
{"label":"K04", "x":5, "y":0}, {"label":"K04", "x":5, "y":0},
{"label":"K05", "x":6.5, "y":0}, {"label":"K05", "x":6.5, "y":0},
{"label":"K06", "x":7.5, "y":0}, {"label":"K06", "x":7.5, "y":0},
{"label":"K07", "x":8.5, "y":0}, {"label":"K07", "x":8.5, "y":0},
{"label":"K08", "x":9.5, "y":0}, {"label":"K08", "x":9.5, "y":0},
{"label":"K09", "x":11, "y":0}, {"label":"K09", "x":11, "y":0},
{"label":"K0A", "x":12, "y":0}, {"label":"K0A", "x":12, "y":0},
{"label":"K0B", "x":13, "y":0}, {"label":"K0B", "x":13, "y":0},
{"label":"K0C", "x":14, "y":0}, {"label":"K0C", "x":14, "y":0},
{"label":"K60", "x":15.25, "y":0},
{"label":"K61", "x":16.25, "y":0}, {"label":"K62", "x":15.25, "y":0},
{"label":"K62", "x":17.25, "y":0}, {"label":"K61", "x":16.25, "y":0},
{"label":"K10", "x":0, "y":1.5}, {"label":"K60", "x":17.25, "y":0},
{"label":"K11", "x":1, "y":1.5},
{"label":"K12", "x":2, "y":1.5}, {"label":"K10", "x":0, "y":1.5},
{"label":"K13", "x":3, "y":1.5}, {"label":"K11", "x":1, "y":1.5},
{"label":"K14", "x":4, "y":1.5}, {"label":"K12", "x":2, "y":1.5},
{"label":"K15", "x":5, "y":1.5}, {"label":"K13", "x":3, "y":1.5},
{"label":"K16", "x":6, "y":1.5}, {"label":"K14", "x":4, "y":1.5},
{"label":"K17", "x":7, "y":1.5}, {"label":"K15", "x":5, "y":1.5},
{"label":"K18", "x":8, "y":1.5}, {"label":"K16", "x":6, "y":1.5},
{"label":"K19", "x":9, "y":1.5}, {"label":"K17", "x":7, "y":1.5},
{"label":"K1A", "x":10, "y":1.5}, {"label":"K18", "x":8, "y":1.5},
{"label":"K1B", "x":11, "y":1.5}, {"label":"K19", "x":9, "y":1.5},
{"label":"K1C", "x":12, "y":1.5}, {"label":"K1A", "x":10, "y":1.5},
{"label":"K5A", "x":13, "y":1.5, "w":2}, {"label":"K1B", "x":11, "y":1.5},
{"label":"K63", "x":15.25, "y":1.5}, {"label":"K1C", "x":12, "y":1.5},
{"label":"K65", "x":16.25, "y":1.5}, {"label":"K5A", "x":13, "y":1.5, "w":2},
{"label":"K67", "x":17.25, "y":1.5},
{"label":"K20", "x":0, "y":2.5, "w":1.5}, {"label":"K63", "x":15.25, "y":1.5},
{"label":"K21", "x":1.5, "y":2.5}, {"label":"K65", "x":16.25, "y":1.5},
{"label":"K22", "x":2.5, "y":2.5}, {"label":"K67", "x":17.25, "y":1.5},
{"label":"K23", "x":3.5, "y":2.5},
{"label":"K24", "x":4.5, "y":2.5}, {"label":"K20", "x":0, "y":2.5, "w":1.5},
{"label":"K25", "x":5.5, "y":2.5}, {"label":"K21", "x":1.5, "y":2.5},
{"label":"K26", "x":6.5, "y":2.5}, {"label":"K22", "x":2.5, "y":2.5},
{"label":"K27", "x":7.5, "y":2.5}, {"label":"K23", "x":3.5, "y":2.5},
{"label":"K28", "x":8.5, "y":2.5}, {"label":"K24", "x":4.5, "y":2.5},
{"label":"K29", "x":9.5, "y":2.5}, {"label":"K25", "x":5.5, "y":2.5},
{"label":"K2A", "x":10.5, "y":2.5}, {"label":"K26", "x":6.5, "y":2.5},
{"label":"K2B", "x":11.5, "y":2.5}, {"label":"K27", "x":7.5, "y":2.5},
{"label":"K2C", "x":12.5, "y":2.5}, {"label":"K28", "x":8.5, "y":2.5},
{"label":"K4C", "x":13.5, "y":2.5, "w":1.5}, {"label":"K29", "x":9.5, "y":2.5},
{"label":"K64", "x":15.25, "y":2.5}, {"label":"K2A", "x":10.5, "y":2.5},
{"label":"K66", "x":16.25, "y":2.5}, {"label":"K2B", "x":11.5, "y":2.5},
{"label":"K68", "x":17.25, "y":2.5}, {"label":"K2C", "x":12.5, "y":2.5},
{"label":"K30", "x":0, "y":3.5, "w":1.75}, {"label":"K4C", "x":13.5, "y":2.5, "w":1.5},
{"label":"K31", "x":1.75, "y":3.5},
{"label":"K32", "x":2.75, "y":3.5}, {"label":"K64", "x":15.25, "y":2.5},
{"label":"K33", "x":3.75, "y":3.5}, {"label":"K66", "x":16.25, "y":2.5},
{"label":"K34", "x":4.75, "y":3.5}, {"label":"K68", "x":17.25, "y":2.5},
{"label":"K35", "x":5.75, "y":3.5},
{"label":"K36", "x":6.75, "y":3.5}, {"label":"K30", "x":0, "y":3.5, "w":1.75},
{"label":"K37", "x":7.75, "y":3.5}, {"label":"K31", "x":1.75, "y":3.5},
{"label":"K38", "x":8.75, "y":3.5}, {"label":"K32", "x":2.75, "y":3.5},
{"label":"K39", "x":9.75, "y":3.5}, {"label":"K33", "x":3.75, "y":3.5},
{"label":"K3A", "x":10.75, "y":3.5}, {"label":"K34", "x":4.75, "y":3.5},
{"label":"K3B", "x":11.75, "y":3.5}, {"label":"K35", "x":5.75, "y":3.5},
{"label":"K3C", "x":12.75, "y":3.5, "w":2.25}, {"label":"K36", "x":6.75, "y":3.5},
{"label":"K40", "x":0, "y":4.5, "w":2.25}, {"label":"K37", "x":7.75, "y":3.5},
{"label":"K41", "x":2.25, "y":4.5}, {"label":"K38", "x":8.75, "y":3.5},
{"label":"K42", "x":3.25, "y":4.5}, {"label":"K39", "x":9.75, "y":3.5},
{"label":"K43", "x":4.25, "y":4.5}, {"label":"K3A", "x":10.75, "y":3.5},
{"label":"K44", "x":5.25, "y":4.5}, {"label":"K3B", "x":11.75, "y":3.5},
{"label":"K45", "x":6.25, "y":4.5}, {"label":"K3C", "x":12.75, "y":3.5, "w":2.25},
{"label":"K46", "x":7.25, "y":4.5},
{"label":"K47", "x":8.25, "y":4.5}, {"label":"K40", "x":0, "y":4.5, "w":2.25},
{"label":"K48", "x":9.25, "y":4.5}, {"label":"K41", "x":2.25, "y":4.5},
{"label":"K49", "x":10.25, "y":4.5}, {"label":"K42", "x":3.25, "y":4.5},
{"label":"K4A", "x":11.25, "y":4.5}, {"label":"K43", "x":4.25, "y":4.5},
{"label":"K4B", "x":12.25, "y":4.5, "w":1.75}, {"label":"K44", "x":5.25, "y":4.5},
{"label":"K69", "x":14, "y":4.5}, {"label":"K45", "x":6.25, "y":4.5},
{"label":"K58", "x":16.25, "y":4.5}, {"label":"K46", "x":7.25, "y":4.5},
{"label":"K50", "x":0, "y":5.5, "w":1.25}, {"label":"K47", "x":8.25, "y":4.5},
{"label":"K51", "x":1.25, "y":5.5, "w":1.25}, {"label":"K48", "x":9.25, "y":4.5},
{"label":"K52", "x":2.5, "y":5.5, "w":1.25}, {"label":"K49", "x":10.25, "y":4.5},
{"label":"K53", "x":3.75, "y":5.5, "w":6.25}, {"label":"K4A", "x":11.25, "y":4.5},
{"label":"K54", "x":10, "y":5.5, "w":1.25}, {"label":"K4B", "x":12.25, "y":4.5, "w":1.75},
{"label":"K55", "x":11.25, "y":5.5, "w":1.25}, {"label":"K69", "x":14, "y":4.5},
{"label":"K56", "x":12.5, "y":5.5, "w":1.25},
{"label":"K57", "x":13.75, "y":5.5, "w":1.25}, {"label":"K58", "x":16.25, "y":4.5},
{"label":"K6A", "x":15.25, "y":5.5},
{"label":"K59", "x":16.25, "y":5.5}, {"label":"K50", "x":0, "y":5.5, "w":1.25},
{"label":"K6B", "x":17.25, "y":5.5} {"label":"K51", "x":1.25, "y":5.5, "w":1.25},
] {"label":"K52", "x":2.5, "y":5.5, "w":1.25},
} {"label":"K53", "x":3.75, "y":5.5, "w":6.25},
{"label":"K54", "x":10, "y":5.5, "w":1.25},
{"label":"K55", "x":11.25, "y":5.5, "w":1.25},
{"label":"K56", "x":12.5, "y":5.5, "w":1.25},
{"label":"K57", "x":13.75, "y":5.5, "w":1.25},
{"label":"K6A", "x":15.25, "y":5.5},
{"label":"K59", "x":16.25, "y":5.5},
{"label":"K6B", "x":17.25, "y":5.5}
]
} }
} }
}

View File

@ -15,64 +15,23 @@
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( \ [0] = LAYOUT(
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_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
KC_PSCR, KC_SLCK, KC_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, \
KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, \
KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, \
KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_LCTL, \
KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = LAYOUT( \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_MPLY, KC_MSTP, RGB_TOG, RGB_MOD, \
RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_VAD, RGB_SAD \
),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MPLY, KC_MSTP,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QMKBEST:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;
case QMKURL:
if (record->event.pressed) {
// when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
} else {
// when keycode QMKURL is released
}
break;
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -16,48 +16,49 @@
#include "x11.h" #include "x11.h"
void matrix_init_kb(void) { void matrix_init_kb(void) {
// put your keyboard start-up code here // put your keyboard start-up code here
// runs once when the firmware starts up // runs once when the firmware starts up
setPinOutput(C6);
setPinOutput(E6); setPinOutput(C6);
setPinOutput(C7); setPinOutput(E6);
matrix_init_user(); setPinOutput(C7);
matrix_init_user();
} }
void matrix_scan_kb(void) { void matrix_scan_kb(void) {
// put your looping keyboard code here // put your looping keyboard code here
// runs every cycle (a lot) // runs every cycle (a lot)
matrix_scan_user(); matrix_scan_user();
} }
bool process_record_kb(uint16_t keycode, keyrecord_t *record) { bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here // put your per-action keyboard code here
// runs for every action, just before processing by the firmware // runs for every action, just before processing by the firmware
return process_record_user(keycode, record); return process_record_user(keycode, record);
} }
void led_set_kb(uint8_t usb_led) { void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(C6); writePinLow(C6);
} else { } else {
writePinHigh(C6); writePinHigh(C6);
} }
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinLow(E6); writePinLow(E6);
} else { } else {
writePinHigh(E6); writePinHigh(E6);
} }
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
writePinLow(C7); writePinLow(C7);
} else { } else {
writePinHigh(C7); writePinHigh(C7);
} }
led_set_user(usb_led); led_set_user(usb_led);
} }

View File

@ -26,18 +26,18 @@
* represents the switch matrix. * represents the switch matrix.
*/ */
#define LAYOUT( \ #define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K60, K61, K62, \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K62, K61, K60, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K5A, K63, K65, K67, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K5A, K63, K65, K67, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4C, K64, K66, K68, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4C, K64, K66, K68, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K69, K58, \ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K69, K58, \
K50, K51, K52, K53, K54, K55, K56, K57, K6A, K59, K6B \ K50, K51, K52, K53, K54, K55, K56, K57, K6A, K59, K6B \
) { \ ) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \
{ K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, KC_NO, KC_NO }, \ { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, KC_NO, KC_NO }, \
{ K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, KC_NO }, \ { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, KC_NO }, \
} }

View File

@ -1,60 +0,0 @@
# TGR Alice
![TGR Alice](https://i.imgur.com/cJohEqS.jpg)
An ergonomic 60% keyboard.
Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury)
Hardware Supported: TGR Alice
Hardware Availability: Group buy finished
Make example for this keyboard (after setting up your build environment):
make alice:default
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
ps2avrGB keyboard firmware
==========================
This keyboard uses the port of the QMK firmware for boards that are based on the
ps2avrGB firmware.
Note that this is a complete replacement for the firmware, so you won't be
using Bootmapper Client to change any keyboard settings, since not all the
USB report options are supported.
## Installing
First, install the requirements. These commands are for OSX, but all you
need is the AVR toolchain and `bootloadHID` for flashing:
```
$ brew cask install crosspack-avr
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
$ pip install pyusb
```
Then, with the keyboard plugged in, simply run this command from the
`qmk_firmware` directory:
```
$ make alice
$ bootloadHID -r alice_default.hex
```
## Setting the board to bootloader mode
Hold the ESC key (the one before the 1! key, in case you remaped it).
## Troubleshooting
From my experience, it's really hard to brick these boards. But these
tricks have been useful when it got stuck in a weird scenario.
1. Try plugging the board in while holding the bootloader key. This will force
it to boot only the bootloader without loading the firmware. Once this is
done, just reflash the board with the original firmware.
2. Sometimes USB hubs can act weird, so try connecting the board directly
to your computer or plugging/unplugging the USB hub.

View File

@ -0,0 +1,43 @@
/* Copyright 2018 Alex Peters
*
* 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 "amj66.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);
}

View File

@ -0,0 +1,79 @@
/* Copyright 2018 Alex Peters
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
// This a shortcut to help you visually see your layout.
/* LAYOUT_all
*
* 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ISO Enter
*
* 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 2C
*
* 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 1D
*
* 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E
*
* 40 41 42 43 44 45 46 47 48 49 4A
*
* 2u Backspace = k0D
* ISO # = k1D
* 2.25u Right Shift = k3C
* 6.25u Space = k44
*/
#define LAYOUT_all( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \
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, \
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 \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, KC_NO }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
}
#define LAYOUT_66_ansi( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \
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, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO, k0F }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \
{ k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E, KC_NO }, \
{ k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
}
#define LAYOUT_66_iso( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2C, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO, k0F }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO, KC_NO }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E, KC_NO }, \
{ k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
}

View File

@ -0,0 +1,55 @@
/*
Copyright 2018 Alex Peters
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0xBD66
#define DEVICE_VER 0x0001
#define MANUFACTURER AMJKeyboard
#define PRODUCT AMJ66
#define DESCRIPTION QMK keyboard firmware for AMJ66
/* Key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 16
/* Keyboard Matrix Assignments */
#define MATRIX_ROW_PINS { F7, F6, F5, F4, F1 }
#define MATRIX_COL_PINS { F0, B3, B2, B1, B0, B7, D0, D1, D2, D3, D5, D6, D7, B4, B5, B6 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
#define BACKLIGHT_BREATHING
#define BREATHING_PERIOD 6
#define BACKLIGHT_ON_STATE 1
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 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

View File

@ -0,0 +1,227 @@
{
"keyboard_name": "AMJ66",
"url": "",
"maintainer": "FSund, qmk",
"width": 16.5,
"height": 5,
"layouts": {
"LAYOUT_all": {
"key_count": 70,
"layout": [
{"label":"~", "x":0, "y":0},
{"label":"!", "x":1, "y":0},
{"label":"@", "x":2, "y":0},
{"label":"#", "x":3, "y":0},
{"label":"$", "x":4, "y":0},
{"label":"%", "x":5, "y":0},
{"label":"^", "x":6, "y":0},
{"label":"&", "x":7, "y":0},
{"label":"*", "x":8, "y":0},
{"label":"(", "x":9, "y":0},
{"label":")", "x":10, "y":0},
{"label":"_", "x":11, "y":0},
{"label":"+", "x":12, "y":0},
{"label":"|", "x":13, "y":0},
{"label":"~", "x":14, "y":0},
{"label":"Insert", "x":15.5, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":"{", "x":11.5, "y":1},
{"label":"}", "x":12.5, "y":1},
{"label":"Backspace", "x":13.5, "y":1, "w":1.5},
{"label":"Delete", "x":15.5, "y":1},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":":", "x":10.75, "y":2},
{"label":"\"", "x":11.75, "y":2},
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
{"label":"Shift", "x":0, "y":3, "w":1.25},
{"label":"ISO Backslash", "x":1.25, "y":3},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":"<", "x":9.25, "y":3},
{"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":1.25},
{"label":"HHKB Fn", "x":13.5, "y":3},
{"label":"Up", "x":14.5, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.5},
{"label":"Space", "x":4, "y":4, "w":2.75},
{"label":"Space", "x":6.75, "y":4, "w":2.75},
{"label":"Alt", "x":9.5, "y":4, "w":1.5},
{"label":"GUI", "x":11, "y":4, "w":1.25},
{"label":"Ctrl", "x":12.25, "y":4, "w":1.25},
{"label":"Left", "x":13.5, "y":4},
{"label":"Down", "x":14.5, "y":4},
{"label":"Right", "x":15.5, "y":4}
]
},
"LAYOUT_66_ansi": {
"key_count": 66,
"layout": [
{"label":"~", "x":0, "y":0},
{"label":"!", "x":1, "y":0},
{"label":"@", "x":2, "y":0},
{"label":"#", "x":3, "y":0},
{"label":"$", "x":4, "y":0},
{"label":"%", "x":5, "y":0},
{"label":"^", "x":6, "y":0},
{"label":"&", "x":7, "y":0},
{"label":"*", "x":8, "y":0},
{"label":"(", "x":9, "y":0},
{"label":")", "x":10, "y":0},
{"label":"_", "x":11, "y":0},
{"label":"+", "x":12, "y":0},
{"label":"Backspace", "x":13, "y":0, "w":2},
{"label":"Insert", "x":15.5, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":"{", "x":11.5, "y":1},
{"label":"}", "x":12.5, "y":1},
{"label":"|", "x":13.5, "y":1, "w":1.5},
{"label":"Delete", "x":15.5, "y":1},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":":", "x":10.75, "y":2},
{"label":"\"", "x":11.75, "y":2},
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
{"label":"Shift", "x":0, "y":3, "w":2.25},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":"<", "x":9.25, "y":3},
{"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":2.25},
{"label":"Up", "x":14.5, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"label":"Space", "x":3.75, "y":4, "w":6.25},
{"label":"Alt", "x":10, "y":4, "w":1.25},
{"label":"Fn", "x":11.25, "y":4},
{"label":"Ctrl", "x":12.25, "y":4, "w":1.25},
{"label":"Left", "x":13.5, "y":4},
{"label":"Down", "x":14.5, "y":4},
{"label":"Right", "x":15.5, "y":4}
]
},
"LAYOUT_66_iso": {
"key_count": 67,
"layout": [
{"label":"\u00ac", "x":0, "y":0},
{"label":"!", "x":1, "y":0},
{"label":"\"", "x":2, "y":0},
{"label":"\u00a3", "x":3, "y":0},
{"label":"$", "x":4, "y":0},
{"label":"%", "x":5, "y":0},
{"label":"^", "x":6, "y":0},
{"label":"&", "x":7, "y":0},
{"label":"*", "x":8, "y":0},
{"label":"(", "x":9, "y":0},
{"label":")", "x":10, "y":0},
{"label":"_", "x":11, "y":0},
{"label":"+", "x":12, "y":0},
{"label":"Backspace", "x":13, "y":0, "w":2},
{"label":"Insert", "x":15.5, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":"{", "x":11.5, "y":1},
{"label":"}", "x":12.5, "y":1},
{"label":"Delete", "x":15.5, "y":1},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":":", "x":10.75, "y":2},
{"label":"@", "x":11.75, "y":2},
{"label":"~", "x":12.75, "y":2},
{"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
{"label":"Shift", "x":0, "y":3, "w":1.25},
{"label":"|", "x":1.25, "y":3},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":"<", "x":9.25, "y":3},
{"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":2.25},
{"label":"Up", "x":14.5, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"label":"Space", "x":3.75, "y":4, "w":6.25},
{"label":"AltGr", "x":10, "y":4, "w":1.25},
{"label":"GUI", "x":11.25, "y":4},
{"label":"Ctrl", "x":12.25, "y":4, "w":1.25},
{"label":"Left", "x":13.5, "y":4},
{"label":"Down", "x":14.5, "y":4},
{"label":"Right", "x":15.5, "y":4}
]
}
}
}

View File

@ -0,0 +1,19 @@
/* Copyright 2018 Alex Peters
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@ -0,0 +1,36 @@
/* Copyright 2018 Alex Peters
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_ESC, 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_GRV, KC_BSPC, KC_INS,
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_all(
KC_GRV, 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_BSPC, KC_BSPC, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_DEL,
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_BRTG, BL_STEP, KC_SLEP, _______, _______, KC_PGUP,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
};

View File

@ -0,0 +1,12 @@
# The default keymap for AMJ66
![AMJ66 Layout Image](https://i.imgur.com/QNpHnMe.jpg)
This is a fairly universal layout that supports standard ANSI, split backspace,
split left shift, and split right shift.
Cycle backlight: Fn + .
Backlight breathing: Fn + ,
Volume Up/Down: Fn + [ and Fn + ]
Mute: Fn + \
Sleep: Fn + /
Bootloader Mode: Fn + CapsLock

View File

@ -0,0 +1,15 @@
# AMJ66
![AMJ66](https://i.imgur.com/qtLuL2o.jpg)
A 66% keyboard formerly sold by Massdrop and KBDFans.
Keyboard Maintainer: [FSund](https://github.com/fsund), [The QMK Community](https://github.com/qmk)
Hardware Supported: AMJ66, ATmega32U4
Hardware Availability: [Drop.com](https://drop.com/buy/kbd66-mechanical-keyboard-kit?mode=guest_open)
Make example for this keyboard (after setting up your build environment):
make amjkeyboard/amj66:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View File

@ -0,0 +1,70 @@
# MCU name
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
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # 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
LAYOUTS = 66_ansi 66_iso

View File

@ -48,16 +48,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_BREATHING // #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
// #define RGB_DI_PIN E2 #define RGB_DI_PIN D3
// #ifdef RGB_DI_PIN #ifdef RGB_DI_PIN
// #define RGBLED_NUM 64 #define RGBLED_NUM 64
// #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_HUE_STEP 8
// #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
// #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ #define RGBLIGHT_LIMIT_VAL 25 /* The maximum brightness level */
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
// /*== all animations enable ==*/ /*== all animations enable ==*/
// #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
// /*== or choose animations ==*/ // /*== or choose animations ==*/
// #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // #define RGBLIGHT_EFFECT_RAINBOW_MOOD
@ -74,7 +74,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// /*==== use exp() and sin() ====*/ // /*==== use exp() and sin() ====*/
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
// #endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCE 5

View File

@ -61,17 +61,17 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 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 # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID

View File

@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5 #define DEBOUNCE 5
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS

View File

@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5 #define DEBOUNCE 5
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS

View File

@ -0,0 +1,19 @@
{
"keyboard_name": "business_card alpha",
"url": "",
"maintainer": "kakunpc",
"width": 3,
"height": 2,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"1", "x":0, "y":0},
{"label":"2", "x":1, "y":0},
{"label":"3", "x":2, "y":0},
{"label":"4", "x":0, "y":1},
{"label":"5", "x":1, "y":1},
{"label":"6", "x":2, "y":1}
]
}
}
}

View File

@ -0,0 +1,19 @@
{
"keyboard_name": "business_card beta",
"url": "",
"maintainer": "kakunpc",
"width": 2,
"height": 3,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"1", "x":0, "y":0},
{"label":"2", "x":1, "y":0},
{"label":"3", "x":0, "y":1},
{"label":"4", "x":1, "y":1},
{"label":"5", "x":0, "y":2},
{"label":"6", "x":1, "y":2}
]
}
}
}

View File

@ -45,21 +45,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
uint32_t processQwerty(bool lookup) { uint32_t processQwerty(bool lookup) {
// SECRET AGENT CHORDS // SECRET AGENT CHORDS
P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__)); P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__));
P( LR | ST2| RR | RB, SEND(KC_BSPC)); P( LR | ST2| RR | RB, SEND(KC_BSPC));
P( LSD | RZ, SEND(KC_SPC)); P( LSD | RZ, SEND(KC_SPC));
// Dual chords // Dual chords
P( LP | LH, CLICK_MOUSE(KC_MS_BTN2)); P( LP | LH, CLICK_MOUSE(KC_MS_BTN2));
P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1)); P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1));
P( LSU | LFT, SEND(KC_ESC)); P( LSU | LFT, SEND(KC_ESC));
P( LSD | LK, SEND(KC_LSFT)); P( LSD | LK, SEND(KC_LSFT));
P( RZ | RS, SEND(KC_LSFT)); P( RZ | RS, SEND(KC_LSFT));
P( ST2 | RR, SEND(KC_SPC)); P( ST2 | RR, SEND(KC_SPC));
P( RP | RL, SEND(KC_LGUI)); P( RP | RL, SEND(KC_LGUI));
P( RT | RD, SEND(KC_LCTL)); P( RT | RD, SEND(KC_LCTL));
P( RL | RT, SEND(KC_LALT)); P( RL | RT, SEND(KC_LALT));
P( LSU | LSD | LFT | LK, SEND(KC_LCTL)); P( LSU | LSD | LFT | LK, SEND(KC_LCTL));
P( RS | RT | RD | RZ, SEND(KC_ENT)); P( RS | RT | RD | RZ, SEND(KC_ENT));
// Function Layer // Function Layer
P( FUNCT | RF, SEND(KC_F1)); P( FUNCT | RF, SEND(KC_F1));
@ -179,6 +179,5 @@ uint32_t processQwerty(bool lookup) {
return 0; return 0;
} }
// Don't fuck with this, thanks. // Don't fuck with this, thanks.
size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);

View File

@ -11,6 +11,18 @@ uint32_t pChord = 0; // Previous Chord
int pChordIndex = 0; // Keys in previousachord int pChordIndex = 0; // Keys in previousachord
uint32_t pChordState[32]; // Previous chord sate uint32_t pChordState[32]; // Previous chord sate
uint32_t stickyBits = 0; // Or'd with every incoming press uint32_t stickyBits = 0; // Or'd with every incoming press
#ifndef NO_DEBUG
char debugMsg[32];
#endif
// StenoLayer
uint32_t releasedChord = 0; // Keys released from current chord
uint32_t tChord = 0; // Protects state of cChord
#ifndef STENOLAYERS
uint32_t stenoLayers[] = { PWR };
size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]);
#endif
// Mode state // Mode state
enum MODE { STENO = 0, QWERTY, COMMAND }; enum MODE { STENO = 0, QWERTY, COMMAND };
@ -39,7 +51,6 @@ bool inMouse = false;
int8_t mousePress; int8_t mousePress;
// All processing done at chordUp goes through here // All processing done at chordUp goes through here
// Note, this is a gutted version of the Georgi sten.h
bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) { bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
// Check for mousekeys, this is release // Check for mousekeys, this is release
#ifdef MOUSEKEY_ENABLE #ifdef MOUSEKEY_ENABLE
@ -50,8 +61,21 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
} }
#endif #endif
// Toggle Serial/QWERTY steno
if (cChord == (PWR | FN | ST1 | ST2)) {
#ifndef NO_DEBUG
uprintf("Fallback Toggle\n");
#endif
QWERSTENO = !QWERSTENO;
goto out;
}
// handle command mode // handle command mode
if (cChord == (LSU | LSD | RD | RZ)) { if (cChord == (PWR | FN | RD | RZ)) {
#ifndef NO_DEBUG
uprintf("COMMAND Toggle\n");
#endif
if (cMode != COMMAND) { // Entering Command Mode if (cMode != COMMAND) { // Entering Command Mode
CMDLEN = 0; CMDLEN = 0;
pMode = cMode; pMode = cMode;
@ -70,7 +94,7 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
} }
// Handle Gaming Toggle, // Handle Gaming Toggle,
if (cChord == (LSU | LSD | LFT | LK | RT | RS | RD | RZ) && keymapsCount > 1) { if (cChord == (PWR | FN | ST4 | ST3) && keymapsCount > 1) {
#ifndef NO_DEBUG #ifndef NO_DEBUG
uprintf("Switching to QMK\n"); uprintf("Switching to QMK\n");
#endif #endif
@ -78,12 +102,39 @@ bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
goto out; goto out;
} }
// Lone FN press, toggle QWERTY
#ifndef ONLYQWERTY
if (cChord == FN) {
(cMode == STENO) ? (cMode = QWERTY) : (cMode = STENO);
goto out;
}
#endif
// Check for Plover momentary
if (cMode == QWERTY && (cChord & FN)) {
cChord ^= FN;
goto steno;
}
// Do QWERTY and Momentary QWERTY // Do QWERTY and Momentary QWERTY
if (cMode == QWERTY || (cMode == COMMAND)) { if (cMode == QWERTY || (cMode == COMMAND) || (cChord & (FN | PWR))) {
processChord(false); processChord(false);
goto out; goto out;
} }
// Fallback NKRO Steno
if (cMode == STENO && QWERSTENO) {
processChord(true);
goto out;
}
steno:
// Hey that's a steno chord!
inChord = false;
chordIndex = 0;
cChord = 0;
return true;
out: out:
cChord = 0; cChord = 0;
inChord = false; inChord = false;

View File

@ -13,11 +13,14 @@
extern size_t keymapsCount; // Total keymaps extern size_t keymapsCount; // Total keymaps
extern uint32_t cChord; // Current Chord extern uint32_t cChord; // Current Chord
extern uint32_t stenoLayers[]; // Chords that simulate QMK layers
extern size_t stenoLayerCount; // Number of simulated layers
uint32_t refChord; // Reference chord for PC macro
// Function defs // Function defs
void processChord(bool useFakeSteno); void processChord(bool useFakeSteno);
uint32_t processQwerty(bool lookup); uint32_t processQwerty(bool lookup);
uint32_t processFakeSteno(bool lookup); uint32_t processFakeSteno(bool lookup);
void saveState(uint32_t cChord); void saveState(uint32_t cChord);
void restoreState(void); void restoreState(void);
@ -30,6 +33,11 @@ void CLICK_MOUSE(uint8_t);
// Keymap helper // Keymap helper
#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} #define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
#define PC(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} \
for(int i = 0; i < stenoLayerCount; i++) { \
refChord = stenoLayers[i] | chord; \
if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \
}
// Shift to internal representation // Shift to internal representation
// i.e) S(teno)R(ight)F // i.e) S(teno)R(ight)F

View File

@ -54,4 +54,4 @@ BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes
ENCODER_ENABLE = yes ENCODER_ENABLE = yes
LAYOUTS = LAYOUT_ortho_5x15 LAYOUTS = ortho_5x15

View File

@ -17,8 +17,8 @@
#include "tmk_core/common/eeprom.h" #include "tmk_core/common/eeprom.h"
// HACK // HACK
#include "keyboards/zeal60/zeal60_api.h" // Temporary hack #include "keyboards/wilba_tech/via_api.h" // Temporary hack
#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack #include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack
/* Artificial delay added to get media keys to work in the encoder*/ /* Artificial delay added to get media keys to work in the encoder*/
@ -72,7 +72,7 @@ void eeprom_set_valid(bool valid)
void eeprom_reset(void) void eeprom_reset(void)
{ {
// Set the Zeal60 specific EEPROM state as invalid. // Set the VIA specific EEPROM state as invalid.
eeprom_set_valid(false); eeprom_set_valid(false);
// Set the TMK/QMK EEPROM state as invalid. // Set the TMK/QMK EEPROM state as invalid.
eeconfig_disable(); eeconfig_disable();

View File

@ -12,8 +12,8 @@
#include "tmk_core/common/eeprom.h" #include "tmk_core/common/eeprom.h"
// HACK // HACK
#include "keyboards/zeal60/zeal60_api.h" // Temporary hack #include "keyboards/wilba_tech/via_api.h" // Temporary hack
#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack #include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack
backlight_config_t kb_backlight_config = { backlight_config_t kb_backlight_config = {

View File

@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5 #define DEBOUNCE 5
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS

View File

@ -0,0 +1,51 @@
/* Copyright 2019 Naoto Takai
*
* 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 "choco60.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
/*
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);
}
*/

View File

@ -0,0 +1,46 @@
/* Copyright 2019 Naoto Takai
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, R08, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, R17, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, \
L40, L41, L43, R40, R41, R43, R44 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, KC_NO, KC_NO, KC_NO }, \
{ L10, L11, L12, L13, L14, L15, KC_NO, KC_NO, KC_NO }, \
{ L20, L21, L22, L23, L24, L25, KC_NO, KC_NO, KC_NO }, \
{ L30, L31, L32, L33, L34, L35, KC_NO, KC_NO, KC_NO }, \
{ L40, L41, KC_NO, L43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ R00, R01, R02, R03, R04, R05, R06, R07, R08 }, \
{ R10, R11, R12, R13, R14, R15, R16, R17, KC_NO }, \
{ R20, R21, R22, R23, R24, R25, R26, KC_NO, KC_NO }, \
{ R30, R31, R32, R33, R34, R35, R36, KC_NO, KC_NO }, \
{ R40, R41, KC_NO, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \
}

View File

@ -0,0 +1,55 @@
/*
Copyright 2019 Naoto Takai
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xC0C0
#define PRODUCT_ID 0x6000
#define DEVICE_VER 0x0001
#define MANUFACTURER Naoto Takai
#define PRODUCT choco60
#define DESCRIPTION A 60% split keyboard for programmers.
/* key matrix size */
#define MATRIX_ROWS 10
#define MATRIX_COLS 9
/*
* 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 { C6, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D1 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D3 // or D1, D2, D3, E6
#define SPLIT_HAND_PIN D0

View File

@ -0,0 +1,12 @@
{
"keyboard_name": "Choco60",
"url": "https://keys.recompile.net/projects/choco60/",
"maintainer": "Naoto Takai",
"width": 16,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":7, "y":0}, {"label":"&", "x":8, "y":0}, {"label":"*", "x":9, "y":0}, {"label":"(", "x":10, "y":0}, {"label":")", "x":11, "y":0}, {"label":"_", "x":12, "y":0}, {"label":"+", "x":13, "y":0}, {"label":"|", "x":14, "y":0}, {"label":"~", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":7.5, "y":1}, {"label":"U", "x":8.5, "y":1}, {"label":"I", "x":9.5, "y":1}, {"label":"O", "x":10.5, "y":1}, {"label":"P", "x":11.5, "y":1}, {"label":"{", "x":12.5, "y":1}, {"label":"}", "x":13.5, "y":1}, {"label":"Delete", "x":14.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":7.75, "y":2}, {"label":"J", "x":8.75, "y":2}, {"label":"K", "x":9.75, "y":2}, {"label":"L", "x":10.75, "y":2}, {"label":":", "x":11.75, "y":2}, {"label":"\"", "x":12.75, "y":2}, {"label":"Return", "x":13.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":8.25, "y":3}, {"label":"M", "x":9.25, "y":3}, {"label":"<", "x":10.25, "y":3}, {"label":">", "x":11.25, "y":3}, {"label":"?", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"Fn", "x":15, "y":3}, {"label":"Opt", "x":1.5, "y":4}, {"label":"\u2318", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":2.75}, {"label":"Opt", "x":7.75, "y":4}, {"x":8.75, "y":4, "w":2.25}, {"label":"\u2318", "x":11, "y":4, "w":1.5}, {"label":"Ctrl", "x":12.5, "y":4}]
}
}
}

View File

@ -0,0 +1,19 @@
/* Copyright 2019 Naoto Takai
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@ -0,0 +1,41 @@
/* Copyright 2019 Naoto Takai
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
enum layer_names {
_BASE,
_FN,
};
#define KC_FN MO(_FN)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSLASH, KC_GRAVE,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSPACE,
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_FN,
KC_LALT, KC_LGUI, KC_SPACE, KC_SPACE, KC_SPACE, KC_RGUI, KC_RALT
),
[_FN] = LAYOUT(
_______, 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_INSERT, KC_DELETE,
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCREEN, KC_SCROLLLOCK, KC_PAUSE, KC_UP, KC_RBRACKET, KC_BSPACE,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_ENTER,
RESET, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDOWN, KC_DOWN, KC_RSHIFT, KC_FN,
_______, _______, _______, _______, _______, KC_STOP, _______
)
};

View File

@ -0,0 +1 @@
# The default keymap for choco60

View File

@ -0,0 +1,15 @@
# choco60
![choco60](https://keys.recompile.net/images/choco60-main@600w.jpg)
A 60% split keyboard for programmers.
Keyboard Maintainer: [Naoto Takai](https://github.com/takai)
Hardware Supported: The Choco60 PCBs, Pro Micro supported
Hardware Availability: https://keys.recompile.net/projects/choco60/
Make example for this keyboard (after setting up your build environment):
make choco60:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View File

@ -0,0 +1,82 @@
# MCU name
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
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = caterina
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # 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 = no # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
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
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
SPLIT_KEYBOARD = yes # Enable split keyboard

View File

@ -1,10 +1,11 @@
# cKeys.org # cKeys.org
[cKeys](https://ckeys.org/) is a mechanical keyboard-based nonprofit organization located in Seattle, Washington. [cKeys](https://ckeys.org/) is an all volunteer run 501c3 nonprofit organization located in Seattle, Washington.
In addition, to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), they have [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository. In addition to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), we teach [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository.
* Supported Hardware * Supported Hardware
* The Obelus - 4x4 Macropad * The Obelus - 4x4 Macropad
* naKey - Through hole numpad * naKey - Through hole numpad
* Handwire 101 - Handwired 4x4 (Proton C or Pro Micro) * Handwire 101 - Handwired 4x4 (Proton C or Pro Micro)
* The Dora Board - 4x5 with rotary encoder and Proton C pinouts

188
keyboards/ckeys/thedora/config.h Executable file
View File

@ -0,0 +1,188 @@
/* Copyright 2019 Branden Byers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER ckeys
#define PRODUCT thedora
#define DESCRIPTION A board for keyboard exploration.
#define ENCODERS_PAD_A { B13 }
#define ENCODERS_PAD_B { B15 }
#define ENCODER_RESOLUTION 4
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 6
#define MATRIX_ROW_PINS { A2, A1, A0, B8 }
#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 }
// #define UNUSED_PINS { B14 }
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
#define DIODE_DIRECTION COL2ROW
//#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
//#define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 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
#define AUDIO_CLICKY
#define DAC_SAMPLE_MAX 65535U
/*
* 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
/*
* 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.
*
*/
/* 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
// Audio Click
// Music Mode Polyphony
// NOTE: Must change polyphony_rate to a number higher than 0 in voices.c
#define AUDIO_VOICES
#define PITCH_STANDARD_A 880.0f
// Mouse keys
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_MAX_SPEED 2
#define MOUSEKEY_TIME_TO_MAX 5
#define MOUSEKEY_WHEEL_DELAY 0
/*
* 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

View File

@ -0,0 +1,16 @@
{
"keyboard_name": "The Dora Board.",
"url": "https://ckeys.org/slides/exboard",
"maintainer": "brandenbyers",
"width": 4,
"height": 4,
"layouts": {
"LAYOUT_ortho_4x5": {
"key_count": 20,
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x": 4, "y":0},
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1},
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2},
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}]
}
}
}

View File

@ -0,0 +1,3 @@
#pragma once
// Add overrides here

View File

@ -0,0 +1,155 @@
#include QMK_KEYBOARD_H
enum layers {
_BASE, // base layer
_MUSIC, // music mode
_MIDI, // midi mode
_MOUSE, // mouse keys
_ADMIN // admin duties
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │
// │ 7 │ 8 │ 9 │ / │ ADMIN │
// ROTORY │ │ │ │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// VOL UP │ │ │ │ │ │
// │ 4 │ 5 │ 6 │ * │ MOUSE │
// ROTORY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// VOL DOWN │ │ │ │ │ │
// │ 1 │ 2 │ 3 │ - │ MIDI │
// │ │ │ │ │ │
// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
// │ TOGGLE │ │ │ │ │ │
// │ MUSIC │ 0 │ . │ = │ + │ MUSIC │
// │ │ │ │ │ │ │
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_BASE] = LAYOUT(
KC_KP_7, KC_KP_8, KC_KP_9, KC_PSLS, MO(_ADMIN), MU_TOG,
KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, TG(_MOUSE),
KC_KP_1, KC_KP_2, KC_KP_3, KC_PMNS, TG(_MIDI),
KC_KP_0, KC_KP_DOT, KC_KP_EQUAL, KC_PPLS, MO(_MUSIC)
),
// MUSIC LAYER
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │
// │ │ │ │ │ │
// ROTORY │ │ │ │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ │ │ │ │ │
// ROTORY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE DOWN│ │ │ │ │ │
// │ │ │ │ MODE │ │
// │ │ │ │ │ │
//┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
//│ │ │ │ │ │ │
//│ │ RECORD │ STOP │ │ PLAY │ │
//│ │ │ │ │ │ │
//└─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_MUSIC] = LAYOUT(
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, _______, _______, _______, MU_MOD,
KC_LCTL, KC_LALT, _______, KC_LGUI, _______
),
// MIDI LAYER
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │
// │ D♯ │ E │ F │ F♯ │ G │
// ROTORY │ │ │ │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ A♯ │ B │ C │ C♯ │ D │
// ROTORY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE DOWN│ │ │ │ │ │
// │ F │ F♯ │ G │ G♯ │ A │
// │ │ │ │ │ │
// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
// │ │ │ │ │ │ │
// │ │ C │ C♯ │ D │ D♯ │ E │
// │ │ │ │ │ │ │
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_MIDI] = LAYOUT(
MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3, _______,
MI_As_2, MI_B_2, MI_C_3, MI_Cs_3, MI_D_3,
MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, TG(_MIDI),
MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2
),
// MOUSE LAYER
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │
// │ BTN 5 │ │ WHEEL │ │ │
// ROTORY │ │ │ UP │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE DOWN│ │ │ │ │ │
// │ │ LEFT │ MOUSE │ RIGHT │ │
// ROTORY │ │ CLICK │ UP │ CLICK │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ BTN 4 │ MOUSE │ MOUSE │ MOUSE │ │
// │ │ LEFT │ DOWN │ RIGHT │ │
// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
// │ │ │ │ │ │ │
// │ │ BTN 3 │ WHEEL │ WHEEL │ WHEEL │ │
// │ │ │ LEFT │ DOWN │ RIGHT │ │
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_MOUSE] = LAYOUT(
KC_MS_BTN5, _______, KC_MS_WH_UP, _______, _______, _______,
_______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, TG(_MOUSE),
KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______,
KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, _______
),
// ADMIN LAYER
// ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// │ │ │ │ │ │
// │ RESET │ │ │ │ │
// ROTORY │ │ │ │ │ │
// RIGHT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE UP │ │ │ │ │ │
// │ 4 │ 5 │ 6 │ * │ │
// ROTORY │ │ │ │ │ │
// LEFT: ├─────────┼─────────┼─────────┼─────────┼─────────┤
// PAGE DOWN│ │ │ │ │ │
// │ 1 │ 2 │ 3 │ │ │
// │ │ │ │ │ │
// ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
// │ │ │ │ │ │ │
// │ │ 0 │ . │ = │ │ │
// │ │ │ │ │ │ │
// └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
[_ADMIN] = LAYOUT(
RESET, _______, _______, _______, TG(_ADMIN), _______,
_______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, _______, _______, _______, _______
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
}
}

View File

@ -0,0 +1 @@
# The default keymap for the cKeys Handwire 101 4x4 keyboard.

View File

@ -0,0 +1,57 @@
# theDora Board
![Thedora Board](https://ckeys.org/images/exboard-3.jpg)
A 4x5 keyboard with rotary encoder, QWIIC connector, and header pinouts for easy access to all pins on the Proton C. This keyboard was built for QMK exploration big and small. What will you discover next?
Keyboard Maintainer: [brandenbyers](https://github.com/brandenbyers)
Hardware Supported: theDora
Hardware Availability: [cKeys.org](https://ckeys.org)
Make example for this keyboard (after setting up your build environment):
`make ckeys/thedora:default`
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](Complete Newbs Guide).
---
## Slides
Slides can be found at: https://ckeys.org/slides/exboard/
## Case Design
The acrylic laser cutter file is coming soon!
## PCB Design
All cKeys PCBs are open source. However, this one has not been posted yet because it needs to be cleaned up a bit! Coming soon!
## Firmware
If you want to reflash the pre-installed firmware, use the `.bin` file for Proton C. Flash with the QMK Toolbox or via the command line.
Building for Proton C: `make ckeys/thedora:default`
## Default Layout
You can find the default layout in `thedora/keymaps/default/keymap.c`
## Rotary Encoder
This is the bit of code at the end of `keymap.c` that needs to changed if you want to change the behavior of the rotary encoder.
```
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN); // What the rotary encoder repeatedly does when turned right.
} else {
tap_code(KC_PGUP); // What it does when turned to the left.
}
}
}
```
![The Dora Board](https://ckeys.org/images/exboard-1.jpg)

View File

@ -0,0 +1,19 @@
MCU = STM32F303
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = yes
MIDI_ENABLE = yes # MIDI controls
RGBLIGHT_ENABLE = no
ENCODER_ENABLE = yes
# SERIAL_LINK_ENABLE = yes

View File

@ -0,0 +1,28 @@
#include "thedora.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
// Turn status LED on
//DDRD |= (1<<6);
//PORTD |= (1<<6);
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);
}

View File

@ -0,0 +1,21 @@
#pragma once
#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 arguements
// The second converts the arguments into a two-dimensional array
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, \
k06, k07, k08, k09, k10, \
k11, k12, k13, k14, k15, \
k16, k17, k18, k19, k20 \
) \
{ \
{ k00, k01, k02, k03, k04, k05, }, \
{ k06, k07, k08, k09, k10 }, \
{ k11, k12, k13, k14, k15 }, \
{ k16, k17, k18, k19, k20 } \
}

View File

@ -0,0 +1,43 @@
/* Copyright 2019 'Naoto Takai'
*
* 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 "cocoa40.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);
}

View File

@ -0,0 +1,44 @@
/* Copyright 2019 'Naoto Takai'
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, \
L31, L32, L33, R30, R32, R33 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, KC_NO, KC_NO }, \
{ L10, L11, L12, L13, L14, L15, KC_NO, KC_NO }, \
{ L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \
{ KC_NO, L31, L32, L33, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ R00, R01, R02, R03, R04, R05, R06, R07 }, \
{ R10, R11, R12, R13, R14, R15, R16, KC_NO }, \
{ R20, R21, R22, R23, R24, R25, R26, KC_NO }, \
{ R30, KC_NO, R32, R33, KC_NO, KC_NO, KC_NO, KC_NO } \
}

View File

@ -0,0 +1,55 @@
/*
Copyright 2019 'Naoto Takai'
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xC0C0
#define PRODUCT_ID 0x4000
#define DEVICE_VER 0x0001
#define MANUFACTURER recompile keys
#define PRODUCT cocoa40
#define DESCRIPTION A 40% keyboard for programmers.
/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 8
/*
* 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 { F4, F5, F6, F7 }
#define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6
#define SPLIT_HAND_PIN D3

View File

@ -0,0 +1,12 @@
{
"keyboard_name": "Cocoa40",
"url": "https://keys.recompile.net/projects/cocoa40/",
"maintainer": "Naoto Takai",
"width": 15.25,
"height": 4,
"layouts": {
"LAYOUT": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":7.25, "y":0}, {"label":"U", "x":8.25, "y":0}, {"label":"I", "x":9.25, "y":0}, {"label":"O", "x":10.25, "y":0}, {"label":"P", "x":11.25, "y":0}, {"label":"{", "x":12.25, "y":0}, {"label":"}", "x":13.25, "y":0}, {"label":"Back<br>Space", "x":14.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":7.5, "y":1}, {"label":"J", "x":8.5, "y":1}, {"label":"K", "x":9.5, "y":1}, {"label":"L", "x":10.5, "y":1}, {"label":":", "x":11.5, "y":1}, {"label":"\"", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1, "w":1.75}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":8, "y":2}, {"label":"M", "x":9, "y":2}, {"label":"<", "x":10, "y":2}, {"label":">", "x":11, "y":2}, {"label":"?", "x":12, "y":2}, {"label":"Shift", "x":13, "y":2, "w":1.25}, {"label":"Fn", "x":14.25, "y":2}, {"label":"Opt", "x":1.5, "y":3}, {"label":"Command", "x":2.5, "y":3, "w":1.5}, {"label":"", "x":4, "y":3, "w":2.25}, {"label":"", "x":7.5, "y":3, "w":2.75}, {"label":"Command", "x":10.25, "y":3, "w":1.5}, {"label":"Opt", "x":11.75, "y":3}]
}
}
}

View File

@ -0,0 +1,20 @@
/* Copyright 2019 'Naoto Takai'
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@ -0,0 +1,55 @@
/* Copyright 2019 'Naoto Takai'
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
enum layer_names {
_BASE,
_NUMS,
_SYMS,
_FN,
};
#define KC_NUMS LT(_NUMS, KC_SPACE)
#define KC_SYMS LT(_SYMS, KC_SPACE)
#define KC_FN MO(_FN)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSPACE,
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_FN,
KC_LALT, KC_LGUI, KC_NUMS, KC_SYMS, KC_RGUI, KC_RALT
),
[_NUMS] = LAYOUT(
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSLASH,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_SYMS] = LAYOUT(
KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_MINUS, KC_PLUS, KC_PIPE,
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_FN] = LAYOUT(
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_DELETE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
};

View File

@ -0,0 +1 @@
# The default keymap for cocoa40

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,15 @@
# cocoa40
![cocoa40](https://keys.recompile.net/images/cocoa40-main@600w.jpg)
A 40% split keyboard for programmers.
Keyboard Maintainer: [Naoto Takai](https://github.com/takai)
Hardware Supported: The Cocoa40 PCBs, Pro Micro supported
Hardware Availability: https://keys.recompile.net/projects/cocoa40/
Make example for this keyboard (after setting up your build environment):
make cocoa40:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

Some files were not shown because too many files have changed in this diff Show More