forked from Github/qmk_firmware
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e5c315f961 | ||
![]() |
0793abfd19 | ||
![]() |
52ecc76e28 | ||
![]() |
4bb0fb2ffc | ||
![]() |
ec59556cd7 | ||
![]() |
661e304033 | ||
![]() |
ae489efee4 | ||
![]() |
8a778d656d | ||
![]() |
a7d05820a6 | ||
![]() |
43757cd985 | ||
![]() |
0e4374042c | ||
![]() |
6c55e8cab5 | ||
![]() |
0e142138aa | ||
![]() |
d17421d074 | ||
![]() |
7d156263ab | ||
![]() |
79bff50247 | ||
![]() |
ab91e07753 | ||
![]() |
f2965e1eea | ||
![]() |
1df10ae3bf | ||
![]() |
5a127293e7 | ||
![]() |
7f6bb82b9d | ||
![]() |
04e28470bc | ||
![]() |
42add5450d | ||
![]() |
be227b4317 |
@@ -3,6 +3,7 @@
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||
* [Learning Resources](newbs_learn_more_resources.md)
|
||||
|
||||
* [QMK Basics](README.md)
|
||||
* [QMK Introduction](getting_started_introduction.md)
|
||||
@@ -47,6 +48,7 @@
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [Bluetooth](feature_bluetooth.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Combos](feature_combo)
|
||||
* [Command](feature_command.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
* [Grave Escape](feature_grave_esc.md)
|
||||
|
@@ -47,6 +47,7 @@
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [Bluetooth](feature_bluetooth.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Combos](feature_combo)
|
||||
* [Command](feature_command.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
* [Grave Escape](feature_grave_esc.md)
|
||||
|
@@ -155,6 +155,10 @@ If you define these options you will enable the associated feature, which may in
|
||||
going to produce the 500 keystrokes a second needed to actually get more than a
|
||||
few ms of delay from this. But if you're doing chording on something with 3-4ms
|
||||
scan times? You probably want this.
|
||||
* `#define COMBO_COUNT 2`
|
||||
* Set this to the number of combos that you're using in the [Combo](feature_combo.md) feature.
|
||||
* `#define COMBO_TERM 200`
|
||||
* how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined.
|
||||
|
||||
## RGB Light Configuration
|
||||
|
||||
@@ -234,6 +238,8 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Console for debug(+400)
|
||||
* `COMMAND_ENABLE`
|
||||
* Commands for debug and configuration
|
||||
* `COMBO_ENABLE`
|
||||
* Key combo feature
|
||||
* `NKRO_ENABLE`
|
||||
* USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
* `AUDIO_ENABLE`
|
||||
|
@@ -26,7 +26,8 @@ These functions allow you to activate layers in various ways. Note that layers a
|
||||
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
|
||||
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
|
||||
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers.
|
||||
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped.
|
||||
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
|
||||
* `OSL(layer)` - momentarily activates *layer* until the next key is pressed. See [One Shot Keys](#one-shot-keys) for details and additional functionality.
|
||||
* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa
|
||||
* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
|
||||
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
|
||||
|
88
docs/feature_combo.md
Normal file
88
docs/feature_combo.md
Normal file
@@ -0,0 +1,88 @@
|
||||
# Combos
|
||||
|
||||
The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the tapping term would hit `ESC` instead, or have it perform even more complex tasks.
|
||||
|
||||
To enable this feature, yu need to add `COMBO_ENABLE = yes` to your `rules.mk`.
|
||||
|
||||
Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using).
|
||||
<!-- At this time, this is necessary -->
|
||||
|
||||
Also, by default, the tapping term for the Combos is set to the same value as `TAPPING_TERM` (200 by default on most boards). But you can specify a different value by defining it in your `config.h`. For instance: `#define COMBO_TERM 300` would set the time out period for combos to 300ms.
|
||||
|
||||
Then, your `keymap.c` file, you'll need to define a sequence of keys, terminated with `COMBO_END`, and a structure to list the combination of keys, and it's resulting action.
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END};
|
||||
combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)};
|
||||
```
|
||||
|
||||
This will send "Escape" if you hit the A and B keys.
|
||||
|
||||
!> This method only supports [basic keycodes](keycodes_basic.md). See the examples for more control.
|
||||
|
||||
## Examples
|
||||
|
||||
If you want to add a list, then you'd use something like this:
|
||||
|
||||
```c
|
||||
enum combos {
|
||||
AB_ESC,
|
||||
JK_TAB
|
||||
}
|
||||
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
|
||||
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
|
||||
|
||||
combo_t key_combos[COMBO_COUNT] = {
|
||||
[AB_ESC] = COMBO(ab_combo, KC_ESC),
|
||||
[JK_TAB] = COMBO(jk_combo, KC_TAB)
|
||||
};
|
||||
```
|
||||
|
||||
For a more complicated implementation, you can use the `process_combo_event` function to add custom handling.
|
||||
|
||||
```c
|
||||
enum combo_events {
|
||||
ZC_COPY,
|
||||
ZV_PASTE
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END};
|
||||
const uint16_t PROGMEM paste_combo[] = {KC_Z, KC_V, COMBO_END};
|
||||
|
||||
combo_t key_combos[COMBO_COUNT] = {
|
||||
[ZC_COPY] = COMBO_ACTION(copy_combo),
|
||||
[ZV_PASTE] = COMBO_ACTION(paste_combo),
|
||||
};
|
||||
|
||||
void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||
switch(combo_index) {
|
||||
case ZC_COPY:
|
||||
if (pressed) {
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_C);
|
||||
unregister_code(KC_C);
|
||||
unregister_code(KC_LCTL);
|
||||
}
|
||||
break;
|
||||
|
||||
case ZV_PASTE:
|
||||
if (pressed) {
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_V);
|
||||
unregister_code(KC_V);
|
||||
unregister_code(KC_LCTL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This will send Ctrl+C if you hit Z and C, and Ctrl+V if you hit Z and V. But you could change this to do stuff like change layers, play sounds, or change settings.
|
||||
|
||||
## Additional Configuration
|
||||
|
||||
If you're using long combos, or even longer combos, you may run into issues with this, as the structure may not be large enough to accommodate what you're doing.
|
||||
|
||||
In this case, you can add either `#define EXTRA_LONG_COMBOS` or `#define EXTRA_EXTRA_LONG_COMBOS` in your `config.h` file.
|
||||
|
||||
You may also be able to enable action keys by defining `COMBO_ALLOW_ACTION_KEYS`.
|
@@ -96,9 +96,10 @@ if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a n
|
||||
|`RGBLIGHT_MODE_RGB_TEST` | *None* |RGB Test |
|
||||
|`RGBLIGHT_MODE_ALTERNATING` | *None* |Alternating |
|
||||
|
||||
|
||||
Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
|
||||
|
||||
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
|
||||
|
||||
The following options can be used to tweak the various animations:
|
||||
|
||||
|Define |Default |Description |
|
||||
|
@@ -82,11 +82,11 @@ sort of like macro. Unfortunately, each OS has different ideas on how Unicode is
|
||||
|
||||
This is the current list of Unicode input method in QMK:
|
||||
|
||||
* _UC_OSX_: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
|
||||
* _UC_OSX_RALT_: Same as UC_OSX, but sends the Right Alt key for unicode input
|
||||
* _UC_LNX_: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
|
||||
* _UC_WIN_: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
|
||||
* _UC_WINC_: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
|
||||
* __UC_OSX__: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
|
||||
* __UC_OSX_RALT__: Same as UC_OSX, but sends the Right Alt key for unicode input
|
||||
* __UC_LNX__: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
|
||||
* __UC_WIN__: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
|
||||
* __UC_WINC__: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
|
||||
|
||||
At some point, you need to call `set_unicode_input_mode(x)` to set the correct unicode method. This sets the method that is used to send the unicode, and stores it in EEPROM, so you only need to call this once.
|
||||
|
||||
|
@@ -8,7 +8,7 @@ If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_
|
||||
|
||||
QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ util/new_project.sh my_awesome_keyboard
|
||||
######################################################
|
||||
# /keyboards/my_awesome_keyboard project created. To start
|
||||
@@ -30,7 +30,7 @@ This is where all the custom logic for your keyboard goes. Many keyboards do not
|
||||
|
||||
This is the file you define your [Layout Macro(s)](feature_layouts.md) in. At minimum you should have a `#define LAYOUT` for your keyboard that looks something like this:
|
||||
|
||||
```
|
||||
```c
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, \
|
||||
k10, k11 \
|
||||
@@ -57,7 +57,7 @@ At the top of the `config.h` you'll find USB related settings. These control how
|
||||
|
||||
Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately reflect your keyboard.
|
||||
|
||||
```
|
||||
```c
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
@@ -72,14 +72,14 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r
|
||||
|
||||
The next section of the `config.h` file deals with your keyboard's matrix. The first thing you should set is the matrix's size. This is usually, but not always, the same number of rows and columns as the physical key arrangement.
|
||||
|
||||
```
|
||||
```c
|
||||
#define MATRIX_ROWS 2
|
||||
#define MATRIX_COLS 3
|
||||
```
|
||||
|
||||
Once you've defined the size of your matrix you need to define which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins:
|
||||
|
||||
```
|
||||
```c
|
||||
#define MATRIX_ROW_PINS { D0, D5 }
|
||||
#define MATRIX_COL_PINS { F1, F0, B0 }
|
||||
#define UNUSED_PINS
|
||||
@@ -89,7 +89,7 @@ The number of `MATRIX_ROW_PINS` entries must be the same as the number you assig
|
||||
|
||||
Finally, you can specify the direction your diodes point. This can be `COL2ROW`, `ROW2COL`, or `CUSTOM_MATRIX`.
|
||||
|
||||
```
|
||||
```c
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
```
|
||||
|
||||
@@ -97,16 +97,14 @@ Finally, you can specify the direction your diodes point. This can be `COL2ROW`,
|
||||
|
||||
By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
|
||||
|
||||
```
|
||||
```c
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 6
|
||||
```
|
||||
|
||||
{% hint style='info' %}
|
||||
You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
|
||||
{% endhint %}
|
||||
?> You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
|
||||
|
||||
### Other Configuration Options
|
||||
|
||||
@@ -120,7 +118,7 @@ You use the `rules.mk` file to tell QMK what files to build and what features to
|
||||
|
||||
These options tell the build system what CPU to build for. Be very careful if you change any of these settings, you can render your keyboard inoperable.
|
||||
|
||||
```
|
||||
```make
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
@@ -128,26 +126,26 @@ F_USB = $(F_CPU)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
```
|
||||
|
||||
### Bootloader Size
|
||||
### Bootloaders
|
||||
|
||||
The bootloader is a special section of your MCU that allows you to upgrade the code stored on the MCU. Think of it like a Rescue Partition for your keyboard. If you are using a teensy 2.0, or a device like the Ergodox EZ that uses the teensy bootloader you should set this to `512`. Most other bootloaders should be set to `4096`, but `1024` and `2048` are other possible values you may encounter.
|
||||
The bootloader is a special section of your MCU that allows you to upgrade the code stored on the MCU. Think of it like a Rescue Partition for your keyboard.
|
||||
|
||||
#### Teensy 2.0 Bootloader Example
|
||||
#### Teensy Bootloader Example
|
||||
|
||||
```
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
```
|
||||
|
||||
#### Teensy 2.0++ Bootloader Example
|
||||
|
||||
```
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=1024
|
||||
```make
|
||||
BOOTLOADER = halfkay
|
||||
```
|
||||
|
||||
#### Atmel DFU Loader Example
|
||||
|
||||
```make
|
||||
BOOTLOADER = atmel-dfu
|
||||
```
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
#### Pro Micro Bootloader Example
|
||||
|
||||
```make
|
||||
BOOTLOADER = caterina
|
||||
```
|
||||
|
||||
### Build Options
|
||||
|
@@ -6,7 +6,7 @@ Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built y
|
||||
|
||||
## Overview
|
||||
|
||||
There are 4 main sections to this guide:
|
||||
There are 5 main sections to this guide:
|
||||
|
||||
* [Getting Started](newbs_getting_started.md)
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
@@ -15,4 +15,3 @@ There are 4 main sections to this guide:
|
||||
* [Learn More with these Resources](newbs_learn_more_resources.md)
|
||||
|
||||
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
||||
|
||||
|
@@ -2,12 +2,12 @@
|
||||
These resources are aimed at giving new members in the qmk community more understanding to the information provided in the newbs docs.
|
||||
|
||||
Git resources:
|
||||
*
|
||||
*[Great General Tutorial](https://www.codecademy.com/learn/learn-git)
|
||||
*[Git Game To Learn From Examples](https://learngitbranching.js.org/)
|
||||
*[Git Resources to Learn More About Github](getting_started_github.md)
|
||||
*[Git Resources Aimed Specificly toward QMK](contributing.md)
|
||||
|
||||
* [Great General Tutorial](https://www.codecademy.com/learn/learn-git)
|
||||
* [Git Game To Learn From Examples](https://learngitbranching.js.org/)
|
||||
* [Git Resources to Learn More About Github](getting_started_github.md)
|
||||
* [Git Resources Aimed Specificly toward QMK](contributing.md)
|
||||
|
||||
|
||||
Command Line resources:
|
||||
*[Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
||||
* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
||||
|
64
keyboards/converter/sun_usb/command_extra.c
Normal file
64
keyboards/converter/sun_usb/command_extra.c
Normal file
@@ -0,0 +1,64 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "protocol/serial.h"
|
||||
|
||||
bool sun_bell = false;
|
||||
bool sun_click = false;
|
||||
|
||||
|
||||
bool command_extra(uint8_t code)
|
||||
{
|
||||
switch (code) {
|
||||
case KC_H:
|
||||
case KC_SLASH: /* ? */
|
||||
print("\n\n----- Sun converter Help -----\n");
|
||||
print("Home: Toggle Bell\n");
|
||||
print("End: Toggle Click\n");
|
||||
print("PgUp: LED all On\n");
|
||||
print("PgDown: LED all Off\n");
|
||||
print("Insert: Layout\n");
|
||||
print("Delete: Reset\n");
|
||||
return false;
|
||||
case KC_DEL:
|
||||
print("Reset\n");
|
||||
serial_send(0x01);
|
||||
break;
|
||||
case KC_HOME:
|
||||
sun_bell = !sun_bell;
|
||||
if (sun_bell) {
|
||||
print("Bell On\n");
|
||||
serial_send(0x02);
|
||||
} else {
|
||||
print("Bell Off\n");
|
||||
serial_send(0x03);
|
||||
}
|
||||
break;
|
||||
case KC_END:
|
||||
sun_click = !sun_click;
|
||||
if (sun_click) {
|
||||
print("Click On\n");
|
||||
serial_send(0x0A);
|
||||
} else {
|
||||
print("Click Off\n");
|
||||
serial_send(0x0B);
|
||||
}
|
||||
break;
|
||||
case KC_PGUP:
|
||||
print("LED all on\n");
|
||||
serial_send(0x0E);
|
||||
serial_send(0xFF);
|
||||
break;
|
||||
case KC_PGDOWN:
|
||||
print("LED all off\n");
|
||||
serial_send(0x0E);
|
||||
serial_send(0x00);
|
||||
break;
|
||||
case KC_INSERT:
|
||||
print("layout\n");
|
||||
serial_send(0x0F);
|
||||
break;
|
||||
default:
|
||||
xprintf("Unknown extra command: %02X\n", code);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
88
keyboards/converter/sun_usb/config.h
Normal file
88
keyboards/converter/sun_usb/config.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#define CUSTOM_MATRIX 2
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x3333
|
||||
#define DEVICE_VER 0x0100
|
||||
#define MANUFACTURER QMK
|
||||
#define PRODUCT Sun keyboard converter
|
||||
#define DESCRIPTION USB converter for Sun type 5 keyboard
|
||||
|
||||
/* matrix size */
|
||||
#define MATRIX_ROWS 16
|
||||
#define MATRIX_COLS 8
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
|
||||
/* Serial(USART) configuration
|
||||
* asynchronous, negative logic, 1200baud, no flow control
|
||||
* 1-start bit, 8-data bit, non parity, 1-stop bit
|
||||
*/
|
||||
#define SERIAL_SOFT_BAUD 1200
|
||||
#define SERIAL_SOFT_PARITY_NONE
|
||||
#define SERIAL_SOFT_BIT_ORDER_LSB
|
||||
#define SERIAL_SOFT_LOGIC_NEGATIVE
|
||||
/* RXD Port */
|
||||
#define SERIAL_SOFT_RXD_ENABLE
|
||||
#define SERIAL_SOFT_RXD_DDR DDRD
|
||||
#define SERIAL_SOFT_RXD_PORT PORTD
|
||||
#define SERIAL_SOFT_RXD_PIN PIND
|
||||
#define SERIAL_SOFT_RXD_BIT 2
|
||||
#define SERIAL_SOFT_RXD_VECT INT2_vect
|
||||
/* RXD Interupt */
|
||||
#define SERIAL_SOFT_RXD_INIT() do { \
|
||||
/* pin configuration: input with pull-up */ \
|
||||
SERIAL_SOFT_RXD_DDR &= ~(1<<SERIAL_SOFT_RXD_BIT); \
|
||||
SERIAL_SOFT_RXD_PORT |= (1<<SERIAL_SOFT_RXD_BIT); \
|
||||
/* enable interrupt: INT2(rising edge) */ \
|
||||
EICRA |= ((1<<ISC21)|(1<<ISC20)); \
|
||||
EIMSK |= (1<<INT2); \
|
||||
sei(); \
|
||||
} while (0)
|
||||
#define SERIAL_SOFT_RXD_INT_ENTER()
|
||||
#define SERIAL_SOFT_RXD_INT_EXIT() do { \
|
||||
/* clear interrupt flag */ \
|
||||
EIFR = (1<<INTF2); \
|
||||
} while (0)
|
||||
#define SERIAL_SOFT_RXD_READ() (SERIAL_SOFT_RXD_PIN&(1<<SERIAL_SOFT_RXD_BIT))
|
||||
/* TXD Port */
|
||||
#define SERIAL_SOFT_TXD_ENABLE
|
||||
#define SERIAL_SOFT_TXD_DDR DDRD
|
||||
#define SERIAL_SOFT_TXD_PORT PORTD
|
||||
#define SERIAL_SOFT_TXD_PIN PIND
|
||||
#define SERIAL_SOFT_TXD_BIT 3
|
||||
#define SERIAL_SOFT_TXD_HI() do { SERIAL_SOFT_TXD_PORT |= (1<<SERIAL_SOFT_TXD_BIT); } while (0)
|
||||
#define SERIAL_SOFT_TXD_LO() do { SERIAL_SOFT_TXD_PORT &= ~(1<<SERIAL_SOFT_TXD_BIT); } while (0)
|
||||
#define SERIAL_SOFT_TXD_INIT() do { \
|
||||
/* pin configuration: output */ \
|
||||
SERIAL_SOFT_TXD_DDR |= (1<<SERIAL_SOFT_TXD_BIT); \
|
||||
/* idle */ \
|
||||
SERIAL_SOFT_TXD_ON(); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
32
keyboards/converter/sun_usb/led.c
Normal file
32
keyboards/converter/sun_usb/led.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "protocol/serial.h"
|
||||
|
||||
void led_set(uint8_t usb_led)
|
||||
{
|
||||
uint8_t sun_led = 0;
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK)) sun_led |= (1<<0);
|
||||
if (usb_led & (1<<USB_LED_COMPOSE)) sun_led |= (1<<1);
|
||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) sun_led |= (1<<2);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) sun_led |= (1<<3);
|
||||
xprintf("LED: %02X\n", usb_led);
|
||||
|
||||
serial_send(0x0E);
|
||||
serial_send(sun_led);
|
||||
}
|
197
keyboards/converter/sun_usb/matrix.c
Normal file
197
keyboards/converter/sun_usb/matrix.c
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "protocol/serial.h"
|
||||
|
||||
/*
|
||||
* Matrix Array usage:
|
||||
*
|
||||
* ROW: 16(4bits)
|
||||
* COL: 8(3bits)
|
||||
*
|
||||
* 8bit wide
|
||||
* +---------+
|
||||
* 0|00 ... 07|
|
||||
* 1|08 ... 0F|
|
||||
* :| ... |
|
||||
* :| ... |
|
||||
* E|70 ... 77|
|
||||
* F|78 ... 7F|
|
||||
* +---------+
|
||||
*/
|
||||
static uint8_t matrix[MATRIX_ROWS];
|
||||
#define ROW(code) ((code>>3)&0xF)
|
||||
#define COL(code) (code&0x07)
|
||||
|
||||
static bool is_modified = false;
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void)
|
||||
{
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void)
|
||||
{
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void)
|
||||
{
|
||||
/* DDRD |= (1<<6); */
|
||||
/* PORTD |= (1<<6); */
|
||||
debug_enable = true;
|
||||
|
||||
serial_init();
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||
|
||||
/* // wait for keyboard coming up */
|
||||
/* // otherwise LED status update fails */
|
||||
/* print("Reseting "); */
|
||||
/* while (1) { */
|
||||
/* print("."); */
|
||||
/* while (serial_recv()); */
|
||||
/* serial_send(0x01); */
|
||||
/* _delay_ms(500); */
|
||||
/* if (serial_recv() == 0xFF) { */
|
||||
/* _delay_ms(500); */
|
||||
/* if (serial_recv() == 0x04) */
|
||||
/* break; */
|
||||
/* } */
|
||||
/* } */
|
||||
/* print(" Done\n"); */
|
||||
|
||||
/* PORTD &= ~(1<<6); */
|
||||
|
||||
matrix_init_quantum();
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
uint8_t code;
|
||||
code = serial_recv();
|
||||
if (!code) return 0;
|
||||
|
||||
debug_hex(code); debug(" ");
|
||||
|
||||
switch (code) {
|
||||
case 0xFF: // reset success: FF 04
|
||||
print("reset: ");
|
||||
_delay_ms(500);
|
||||
code = serial_recv();
|
||||
xprintf("%02X\n", code);
|
||||
if (code == 0x04) {
|
||||
// LED status
|
||||
led_set(host_keyboard_leds());
|
||||
}
|
||||
return 0;
|
||||
case 0xFE: // layout: FE <layout>
|
||||
print("layout: ");
|
||||
_delay_ms(500);
|
||||
xprintf("%02X\n", serial_recv());
|
||||
return 0;
|
||||
case 0x7E: // reset fail: 7E 01
|
||||
print("reset fail: ");
|
||||
_delay_ms(500);
|
||||
xprintf("%02X\n", serial_recv());
|
||||
return 0;
|
||||
case 0x7F:
|
||||
// all keys up
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (code&0x80) {
|
||||
// break code
|
||||
if (matrix_is_on(ROW(code), COL(code))) {
|
||||
matrix[ROW(code)] &= ~(1<<COL(code));
|
||||
}
|
||||
} else {
|
||||
// make code
|
||||
if (!matrix_is_on(ROW(code), COL(code))) {
|
||||
matrix[ROW(code)] |= (1<<COL(code));
|
||||
}
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
return code;
|
||||
}
|
||||
|
||||
bool matrix_is_modified(void)
|
||||
{
|
||||
return is_modified;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_has_ghost(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & (1<<col));
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print("\nr/c 01234567\n");
|
||||
for (uint8_t row = 0; row < matrix_rows(); row++) {
|
||||
phex(row); print(": ");
|
||||
pbin_reverse(matrix_get_row(row));
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += bitpop(matrix[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
89
keyboards/converter/sun_usb/readme.md
Normal file
89
keyboards/converter/sun_usb/readme.md
Normal file
@@ -0,0 +1,89 @@
|
||||
# Sun to USB keyboard protocol converter
|
||||
|
||||
A converter for using non-USB Sun keyboards.
|
||||
|
||||
Original code from the [TMK firmware](https://github.com/tmk/tmk_keyboard/tree/master/converter/sun_usb). Ported to QMK by [Yann Hodique](https://github.com/sigma).
|
||||
|
||||
Keyboard Maintainer: [Yann Hodique](https://github.com/sigma)
|
||||
Hardware Supported: See hardware section below
|
||||
Hardware Availability: self-built
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make converter/sun_usb/type5:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||
|
||||
|
||||
## Hardware
|
||||
|
||||
Target MCU is ATMega32u4 but other USB capable AVR will also work. The maintainer mostly uses Teensy 2.0 boards.
|
||||
Supported keyboards: Sun Type 3 and 5 Keyboards,
|
||||
|
||||
### Connector
|
||||
|
||||
8Pin mini DIN
|
||||
|
||||
___ ___
|
||||
/ |_| \
|
||||
/ 8 7 6 \
|
||||
| 5 4 3 |
|
||||
\_ 2 1 _/
|
||||
\_____/
|
||||
(receptacle)
|
||||
|
||||
|
||||
Wiring:
|
||||
|
||||
Pin mini DIN MCU
|
||||
----------------------------------
|
||||
1 GND GND
|
||||
2 GND GND
|
||||
3 5V
|
||||
4 RX/TX(Mouse)
|
||||
5 RX PD3
|
||||
6 TX PD2
|
||||
7 GND GND
|
||||
8 5V VCC
|
||||
|
||||
|
||||
### Protocol
|
||||
|
||||
Signal: Asynchronous, Negative logic, 1200baud, No Flow control
|
||||
Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit
|
||||
|
||||
AVR USART engine expects positive logic while Sun keyboard signal is negative.
|
||||
To use AVR UART engine you need external inverter in front of RX and TX pin.
|
||||
Otherwise you can software serial routine to communicate the keyboard.
|
||||
|
||||
This converter uses software method, you doesn't need any inverter part.
|
||||
|
||||
|
||||
Commands From System To Keyboard
|
||||
|
||||
0x01 Reset
|
||||
Keyboard responds with following byte sequence:
|
||||
Success: 0xFF 0x04 0x7F
|
||||
Fail: 0x7E 0x01 0x7F
|
||||
0x02 Bell On
|
||||
0x03 Bell Off
|
||||
0x0A Click On
|
||||
0x0B Click Off
|
||||
0x0E LED
|
||||
followed by LED status byte:
|
||||
bit: 3 2 1 0
|
||||
LED: CapsLk ScrLk Compose NumLk
|
||||
0x0F Layout
|
||||
Keyboard responds with 'Layout Response' 0xFE 0xXX
|
||||
|
||||
Commands From Keyboard To System
|
||||
|
||||
0x7F Idle
|
||||
means no keys pressed.
|
||||
0xFE Layout Response
|
||||
0xFF Reset Response(followed by 0x04)
|
||||
|
||||
References
|
||||
|
||||
* http://kentie.net/article/sunkbd/page2.htm
|
||||
* http://kentie.net/article/sunkbd/KBD.pdf
|
42
keyboards/converter/sun_usb/rules.mk
Normal file
42
keyboards/converter/sun_usb/rules.mk
Normal file
@@ -0,0 +1,42 @@
|
||||
MCU = atmega32u4 # Teensy 2.0
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
BOOTLOADER = lufa-dfu
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
UNICODEMAP_ENABLE = yes
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
CUSTOM_MATRIX = yes
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
#HARDWARE_SERIAL = yes
|
||||
|
||||
SRC += matrix.c led.c
|
||||
|
||||
ifdef HARDWARE_SERIAL
|
||||
SRC += protocol/serial_uart.c
|
||||
OPT_DEFS += -DHARDWARE_SERIAL
|
||||
else
|
||||
SRC += protocol/serial_soft.c
|
||||
endif
|
29
keyboards/converter/sun_usb/type3/keymaps/default/keymap.c
Normal file
29
keyboards/converter/sun_usb/type3/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
LAYOUT(
|
||||
KC_F10,KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_BSPC, KC_VOLD, KC_MUTE, KC_VOLU,
|
||||
KC_F12,KC_F13, 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_BSLS,KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT,
|
||||
KC_F14,KC_F15, 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_DEL, KC_HOME, KC_UP, KC_PGUP,
|
||||
KC_F16,KC_F17, KC_LCTL, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_LEFT,KC_INSERT,KC_RIGHT,
|
||||
KC_F18,KC_F19, 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_RCTL, KC_END, KC_DOWN,KC_PGDOWN,
|
||||
KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI
|
||||
),
|
||||
};
|
0
keyboards/converter/sun_usb/type3/rules.mk
Normal file
0
keyboards/converter/sun_usb/type3/rules.mk
Normal file
66
keyboards/converter/sun_usb/type3/type3.h
Normal file
66
keyboards/converter/sun_usb/type3/type3.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TYPE3_H
|
||||
#define TYPE3_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* Sun type 3 keyboard
|
||||
,-------. ,-----------------------------------------------------------. ,-----------.
|
||||
| 01| 03| | 05| 06| 08| 0A| 0C| 0E| 10| 11| 12| 2B| | 15| 16| 17|
|
||||
|-------| |-----------------------------------------------------------| |-----------|
|
||||
| 19| 1A| | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A| | 2D| 2E| 2F|
|
||||
|-------| |-----------------------------------------------------------| |-----------|
|
||||
| 31| 33| | 35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 42 | | 44| 45| 46|
|
||||
|-------| |-----------------------------------------------------------| |-----------|
|
||||
| 48| 49| | 4C | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 59 | | 5B| 5C| 5D|
|
||||
|-------| |-----------------------------------------------------------| |-----------|
|
||||
| 5F| 61| | 63 | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E| 6F| | 70| 71| 72|
|
||||
`-------' |-----------------------------------------------------------| `-----------'
|
||||
| 77 | 78 | 79 | 7A | 13 |
|
||||
`-----------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
#define LAYOUT( \
|
||||
K01,K03, K05,K06, K08, K0A, K0C, K0E, K10,K11,K12,K2B, K15,K16,K17, \
|
||||
K19,K1A, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2D,K2E,K2F, \
|
||||
K31,K33, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K42, K44,K45,K46, \
|
||||
K48,K49, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \
|
||||
K5F,K61, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E,K6F, K70,K71,K72, \
|
||||
K77,K78, K79, K7A,K13 \
|
||||
) { \
|
||||
{ KC_NO, K01 , KC_NO, K03 , KC_NO, K05 , K06 , KC_NO }, \
|
||||
{ K08 , KC_NO, K0A , KC_NO, K0C , KC_NO, K0E , KC_NO }, \
|
||||
{ K10 , K11 , K12 , K13 , KC_NO, K15 , K16 , K17 }, \
|
||||
{ KC_NO, K19 , K1A , KC_NO, KC_NO, K1D , K1E , K1F }, \
|
||||
{ K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \
|
||||
{ K28 , K29 , K2A , K2B , KC_NO, K2D , K2E , K2F }, \
|
||||
{ KC_NO, K31 , KC_NO, K33 , KC_NO, K35 , K36 , K37 }, \
|
||||
{ K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \
|
||||
{ K40 , K41 , K42 , KC_NO, K44 , K45 , K46 , KC_NO }, \
|
||||
{ K48 , K49 , KC_NO, KC_NO, K4C , K4D , K4E , K4F }, \
|
||||
{ K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \
|
||||
{ K58 , K59 , KC_NO, K5B , K5C , K5D , KC_NO, K5F }, \
|
||||
{ KC_NO, K61 , KC_NO, K63 , K64 , K65 , K66 , K67 }, \
|
||||
{ K68 , K69 , K6A , K6B , K6C , K6D , K6E , K6F }, \
|
||||
{ K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, KC_NO, K77 }, \
|
||||
{ K78 , K79 , K7A , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||
}
|
||||
|
||||
#endif
|
30
keyboards/converter/sun_usb/type5/keymaps/default/keymap.c
Normal file
30
keyboards/converter/sun_usb/type5/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* LAYOUT_jp_unix is a superset of the other layouts, hence the default */
|
||||
LAYOUT_jp_unix(
|
||||
KC_HELP, KC_NO, 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_MUTE,KC_VOLD,KC_VOLU,KC_PWR,
|
||||
KC_STOP, KC_AGAIN, 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_BSLS,KC_GRV, KC_INS, KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
|
||||
KC_MENU, KC_UNDO, KC_TAB, KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC, KC_BSPC, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_SELECT, KC_COPY, KC_LCTL, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_EXECUTE,KC_PASTE, KC_LSFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_FIND, KC_CUT, KC_CAPS,KC_LALT,KC_LGUI,KC_HENK, KC_SPC, KC_MHEN,KC_KANA,KC_RGUI,KC_APP,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT
|
||||
),
|
||||
};
|
0
keyboards/converter/sun_usb/type5/rules.mk
Normal file
0
keyboards/converter/sun_usb/type5/rules.mk
Normal file
148
keyboards/converter/sun_usb/type5/type5.h
Normal file
148
keyboards/converter/sun_usb/type5/type5.h
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TYPE5_H
|
||||
#define TYPE5_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* sun type 5 keyboard, JP Unix-style
|
||||
,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------.
|
||||
| 76 | | 0F| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30|
|
||||
`-------' `---' `---------------' `---------------' `---------------' `-----------' `---------------'
|
||||
,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||
| 01| 03| | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A| | 2C| 34| 60| | 62| 2E| 2F| 47|
|
||||
|-------| |-----------------------------------------------------------| |------------ |---------------|
|
||||
| 19| 1A| | 35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 2B | | 42| 4A| 7B| | 44| 45| 46| |
|
||||
|-------| |-----------------------------------------------------------| `-----------' |-----------| 7D|
|
||||
| 31| 33| | 4C | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 59 | | 5B| 5C| 5D| |
|
||||
|-------| |-----------------------------------------------------------| ,---. |-----------|---|
|
||||
| 48| 49| | 63 | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E | | 14| | 70| 71| 72| |
|
||||
|-------| |-----------------------------------------------------------| .-----------. |-----------| 5A|
|
||||
| 5F| 61| | 77 | 13| 78 |*73 | 79 |*74 |*75| 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| |
|
||||
`-------' `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
#define LAYOUT_jp_unix( \
|
||||
K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \
|
||||
K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \
|
||||
K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \
|
||||
K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \
|
||||
K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \
|
||||
K5F,K61, K77,K13, K78, K73, K79, K74, K75, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \
|
||||
) { \
|
||||
{ KC_NO, 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 , K1F }, \
|
||||
{ K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \
|
||||
{ K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \
|
||||
{ K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \
|
||||
{ K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \
|
||||
{ K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \
|
||||
{ K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \
|
||||
{ K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \
|
||||
{ K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \
|
||||
{ K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \
|
||||
{ K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \
|
||||
{ K70 , K71 , K72 , K73 , K74 , K75 , K76 , K77 }, \
|
||||
{ K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \
|
||||
}
|
||||
|
||||
/* Sun type 5 keyboard, US Unix-style
|
||||
,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------.
|
||||
| 76 | | 0F| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30|
|
||||
`-------' `---' `---------------' `---------------' `---------------' `-----------' `---------------'
|
||||
,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||
| 01| 03| | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A| | 2C| 34| 60| | 62| 2E| 2F| 47|
|
||||
|-------| |-----------------------------------------------------------| |------------ |---------------|
|
||||
| 19| 1A| | 35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 2B | | 42| 4A| 7B| | 44| 45| 46| |
|
||||
|-------| |-----------------------------------------------------------| `-----------' |-----------| 7D|
|
||||
| 31| 33| | 4C | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 59 | | 5B| 5C| 5D| |
|
||||
|-------| |-----------------------------------------------------------| ,---. |-----------|---|
|
||||
| 48| 49| | 63 | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E | | 14| | 70| 71| 72| |
|
||||
|-------| |-----------------------------------------------------------| .-----------. |-----------| 5A|
|
||||
| 5F| 61| | 77 | 13| 78 | 79 | 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| |
|
||||
`-------' `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
#define LAYOUT_us_unix( \
|
||||
K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \
|
||||
K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \
|
||||
K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \
|
||||
K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \
|
||||
K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \
|
||||
K5F,K61, K77,K13, K78, K79, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \
|
||||
) { \
|
||||
{ KC_NO, 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 , K1F }, \
|
||||
{ K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \
|
||||
{ K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \
|
||||
{ K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \
|
||||
{ K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \
|
||||
{ K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \
|
||||
{ K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \
|
||||
{ K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \
|
||||
{ K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \
|
||||
{ K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \
|
||||
{ K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \
|
||||
{ K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, K76 , K77 }, \
|
||||
{ K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \
|
||||
}
|
||||
|
||||
/* Sun type 5 keyboard, US ANSI-style
|
||||
,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------.
|
||||
| 76 | | 1D| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30|
|
||||
`-------' `---' `---------------' `---------------' `---------------' `-----------' `---------------'
|
||||
,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||
| 01| 03| | 2A| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 2B | | 2C| 34| 60| | 62| 2E| 2F| 47|
|
||||
|-------| |-----------------------------------------------------------| |------------ |---------------|
|
||||
| 19| 1A| | 35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 58 | | 42| 4A| 7B| | 44| 45| 46| |
|
||||
|-------| |-----------------------------------------------------------| `-----------' |-----------| 7D|
|
||||
| 31| 33| | 77 | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 59 | | 5B| 5C| 5D| |
|
||||
|-------| |-----------------------------------------------------------| ,---. |-----------|---|
|
||||
| 48| 49| | 63 | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E | | 14| | 70| 71| 72| |
|
||||
|-------| |-----------------------------------------------------------| .-----------. |-----------| 5A|
|
||||
| 5F| 61| | 4C | 13| 78 | 79 | 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| |
|
||||
`-------' `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
#define LAYOUT_ansi( \
|
||||
K76, K1D, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \
|
||||
K01,K03, K2A,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29, K2B, K2C,K34,K60, K62,K2E,K2F,K47, \
|
||||
K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K58, K42,K4A,K7B, K44,K45,K46,K7D, \
|
||||
K31,K33, K77, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \
|
||||
K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \
|
||||
K5F,K61, K4C,K13, K78, K79, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \
|
||||
) { \
|
||||
{ KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \
|
||||
{ K08 , K09 , K0A , K0B , K0C , K0D , K0E , KC_NO,}, \
|
||||
{ K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \
|
||||
{ K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \
|
||||
{ K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \
|
||||
{ K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \
|
||||
{ K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \
|
||||
{ K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \
|
||||
{ K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \
|
||||
{ K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \
|
||||
{ K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \
|
||||
{ K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \
|
||||
{ K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \
|
||||
{ K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \
|
||||
{ K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, K76 , K77 }, \
|
||||
{ K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \
|
||||
}
|
||||
#endif
|
52
keyboards/dz60/keymaps/boris_burger/README.md
Normal file
52
keyboards/dz60/keymaps/boris_burger/README.md
Normal file
@@ -0,0 +1,52 @@
|
||||
### boris_burger's DZ60 layout
|
||||
|
||||
This layout is for a DZ60 with a 2U left shift, 1U right shift and an arrow cluster in
|
||||
the bottom right.
|
||||
|
||||
It is based off stephengrier's layout adding support for Home/End/PgUp/PgDn using Fn+arrows
|
||||
as used on macOS and Microsoft Surface. It has Insert instead of Fn near the arrow cluster
|
||||
and other smaller tweaks:
|
||||
- CapsLock is the only Fn key (CapsLock by itself is not available)
|
||||
- Del is available as Fn+Backspace
|
||||
- Ctrl+Del is available as Ctrl+Backspace (e.g. deleting word to the right of the cursor)
|
||||
- Shift+Del is available as Shift+Backspace (e.g. permanently deleting file or e-mail)
|
||||
- PgUp = Fn+Up
|
||||
- PgDn = Fn+Down
|
||||
- Home = Fn+Left
|
||||
- End = Fn+Right
|
||||
- Tilde = Shift+Esc
|
||||
- Backtick = Fn+Esc
|
||||
- Underglow toggle and mode selection are available as Fn+Q and Fn+W
|
||||
- Reset (bootloader mode) = Fn+B
|
||||
|
||||
### 0 Qwerty
|
||||
```
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | Ins |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Ctrl | Win | Alt | Space | Alt | Menu | L | D | R |
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### 1 Fn Layer
|
||||
```
|
||||
FN Layer
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | BL T| BL M| BL+ | BL- | | | | | | | | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | |RESET| | | | | | | PgUp| |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | Home| PgDn| End |
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
1
keyboards/dz60/keymaps/boris_burger/config.h
Normal file
1
keyboards/dz60/keymaps/boris_burger/config.h
Normal file
@@ -0,0 +1 @@
|
||||
#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed
|
87
keyboards/dz60/keymaps/boris_burger/keymap.c
Normal file
87
keyboards/dz60/keymaps/boris_burger/keymap.c
Normal file
@@ -0,0 +1,87 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
/* Holds state of modifiers when Backspace was pressed.
|
||||
* Used to ensure that the correct keycode is unregistered when Backspace is released.
|
||||
*/
|
||||
static uint8_t bspc_mods = 0;
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | Ins |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Win | Alt | Space | Alt | Menu | L | D | R |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
LAYOUT_directional(
|
||||
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,
|
||||
MO(1) , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT ,
|
||||
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_INS ,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | BL T| BL M| BL+ | BL- | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | |RESET| | | | | | | PgUp| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | Home| PgDn| End |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
LAYOUT_directional(
|
||||
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 ,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||
_______, BL_TOGG, BL_STEP, BL_INC , BL_DEC , _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, RESET , _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case KC_BSPC: {
|
||||
if (record->event.pressed) {
|
||||
const uint8_t current_mods = get_mods();
|
||||
const uint8_t shift = current_mods & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
||||
const uint8_t ctrl = current_mods & (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTL));
|
||||
bspc_mods = current_mods;
|
||||
if(shift || ctrl) {
|
||||
add_key(KC_DEL);
|
||||
add_mods(current_mods);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(bspc_mods & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTL))) {
|
||||
// if Shift or Ctrl was pressed with Backspace, than that was intepreted as Del, so we need
|
||||
// to unregister the Del key
|
||||
del_key(KC_DEL);
|
||||
} else {
|
||||
// Either Backspace was pressed without mods, or with a modifier other than Shift or Ctrl
|
||||
// so it is simply taken as Backspace
|
||||
del_key(KC_BSPC);
|
||||
}
|
||||
send_keyboard_report();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
48
keyboards/dz60/keymaps/crd/keymap.c
Normal file
48
keyboards/dz60/keymaps/crd/keymap.c
Normal file
@@ -0,0 +1,48 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl/Esc| A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Alt | Cmd | Space | Cmd | FN | L | D | R |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
LAYOUT_directional(
|
||||
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,
|
||||
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | RESET |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | BL T| BL M| BL+ | BL- | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | |PgUp | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | |Home |PgDn | End |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
LAYOUT_directional(
|
||||
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_TRNS, RESET,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||
_______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
||||
),
|
||||
};
|
15
keyboards/evil80/readme.md
Normal file
15
keyboards/evil80/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Evil 80
|
||||
|
||||

|
||||
|
||||
Also known as the Odyssey, the Evil 80 is a QMK-powered aluminum TKL keyboard featuring an Aviator connector cable. Sold via a Geekhack group buy in January of 2018.
|
||||
|
||||
Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
|
||||
Hardware Supported: Evil 80-Odyssey QMK version
|
||||
Hardware Availability: [Geekhack](https://geekhack.org/index.php?topic=93434.0)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make evil80: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).
|
@@ -27,3 +27,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define AUDIO_CLICKY
|
||||
#endif
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_ANIMATIONS)
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
@@ -92,7 +92,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
|
@@ -28,4 +28,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define AUDIO_CLICKY
|
||||
#endif
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_ANIMATIONS)
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
||||
|
@@ -238,7 +238,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(16);
|
||||
//rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
|
||||
#endif
|
||||
}
|
||||
layer_on(_LOWER);
|
||||
@@ -261,7 +261,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(15);
|
||||
//rgblight_mode(RGBLIGHT_MODE_SNAKE);
|
||||
#endif
|
||||
}
|
||||
layer_on(_RAISE);
|
||||
|
@@ -92,7 +92,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
|
@@ -368,7 +368,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
rgblight_mode(16);
|
||||
rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
|
||||
}
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
@@ -387,7 +387,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
rgblight_mode(15);
|
||||
rgblight_mode(RGBLIGHT_MODE_SNAKE);
|
||||
}
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
|
@@ -21,9 +21,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
// if you need more program area, try uncomment follow line
|
||||
//#include "serial_config_simpleapi.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_ANIMATIONS)
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
||||
|
@@ -373,7 +373,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(16);
|
||||
//rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
|
||||
#endif
|
||||
}
|
||||
layer_on(_LOWER);
|
||||
@@ -396,7 +396,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(15);
|
||||
//rgblight_mode(RGBLIGHT_MODE_SNAKE);
|
||||
#endif
|
||||
}
|
||||
layer_on(_RAISE);
|
||||
|
@@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
|
@@ -1,11 +1,23 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
// if you need more program area, try uncomment follow line
|
||||
//#include "serial_config_simpleapi.h"
|
||||
|
||||
#undef TAPPING_FORCE_HOLD
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 120
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_ANIMATIONS)
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
||||
|
@@ -35,7 +35,7 @@ void matrix_scan_user(void) {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
uint32_t layer_state_set_keymap(uint32_t state) {
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
switch (biton32(state)) {
|
||||
case _EDVORAKJ1:
|
||||
case _EDVORAKJ2:
|
||||
@@ -52,7 +52,7 @@ uint32_t layer_state_set_keymap(uint32_t state) {
|
||||
rgblight_sethsv_noeeprom_green();
|
||||
break;
|
||||
default: // for any other layers, or the default layer
|
||||
rgblight_mode_noeeprom(28);
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
||||
rgblight_sethsv_noeeprom_red();
|
||||
break;
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
|
@@ -23,9 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// place overrides here
|
||||
|
||||
// if you need more program area, try uncomment follow line
|
||||
//#include "serial_config_simpleapi.h"
|
||||
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
#undef MOUSEKEY_INTERVAL
|
||||
#define MOUSEKEY_INTERVAL 0
|
||||
@@ -43,4 +40,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#endif
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_ANIMATIONS)
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
||||
|
@@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
|
@@ -21,12 +21,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
// if you need more program area, try uncomment follow line
|
||||
//#include "serial_config_simpleapi.h"
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 200
|
||||
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
|
||||
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_ANIMATIONS)
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
||||
|
@@ -399,7 +399,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(6);
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
@@ -408,7 +408,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(10);
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
@@ -417,7 +417,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(21);
|
||||
rgblight_mode(RGBLIGHT_MODE_KNIGHT);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
@@ -508,7 +508,7 @@ void led_ripple_effect(char r, char g, char b) {
|
||||
|
||||
if (scan_count == -1) {
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode(0);
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
} else if (scan_count >= 0 && scan_count < 5) {
|
||||
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
|
||||
int i = c;
|
||||
|
@@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
|
@@ -21,3 +21,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/* auto shift config */
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_ANIMATIONS)
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
@@ -312,7 +312,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(16);
|
||||
//rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
|
||||
#endif
|
||||
}
|
||||
layer_on(_LOWER);
|
||||
@@ -335,7 +335,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(15);
|
||||
//rgblight_mode(RGBLIGHT_MODE_SNAKE);
|
||||
#endif
|
||||
}
|
||||
layer_on(_RAISE);
|
||||
@@ -450,7 +450,7 @@ void music_scale_user(void)
|
||||
|
||||
// hook point for 'led_test' keymap
|
||||
// 'default' keymap's led_test_init() is empty function, do nothing
|
||||
// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35);
|
||||
// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
|
||||
__attribute__ ((weak))
|
||||
void led_test_init(void) {}
|
||||
|
||||
|
@@ -99,7 +99,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
|
33
keyboards/iris/keymaps/gsigler/config.h
Normal file
33
keyboards/iris/keymaps/gsigler/config.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
Copyright 2018 Grady Sigler <gradysigler@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#define AUTO_SHIFT_TIMEOUT 95
|
||||
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
|
||||
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
74
keyboards/iris/keymaps/gsigler/keymap.c
Normal file
74
keyboards/iris/keymaps/gsigler/keymap.c
Normal file
@@ -0,0 +1,74 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum iris_layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
//| `/~ | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | _/- |
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| TAB | Q | W | E | R | T | | Y | U | I | O | P | +/= |
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| RAISE | A | S | D | F | G | | H | J | K | L | :/; | "/' |
|
||||
RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| LOWER | Z | X | C | V | B | ESC | | ALT | N | M | </, | >/. | ?-/ | |-\ |
|
||||
LOWER, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
// | CTRL | COMMAND| BKSPACE| | SPACE | ENTER | SHIFT |
|
||||
KC_LCTL, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, KC_LSFT
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
//KC_LALT ALT
|
||||
[_RAISE] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
//| `/~ | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| TAB | ! | @ | { | } | | | | | | ↑ | | | F12 |
|
||||
KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, KC_F12,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| RAISE | # | $ | ( | ) | ` | | ? | ← | ↓ | → | | VOLUP |
|
||||
KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_QUES, KC_LEFT,KC_DOWN, KC_RGHT, XXXXXXX, KC__VOLUP,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| | % | ^ | [ | ] | ~ | ESC | ALT | & | | | | MUTE | VOLDN |
|
||||
XXXXXXX, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, XXXXXXX, XXXXXXX,XXXXXXX, KC__MUTE,KC__VOLDOWN,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
// | CTRL | COMMAND| BKSPACE| | SPACE | ENTER | SHIFT|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
//| | | | | | | | | 7 | 8 | 9 | * | / |
|
||||
KC_ASUP, KC_ASON, KC_ASRP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PSLS,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| | | | | | | | | 4 | 5 | 6 | + | - |
|
||||
KC_ASDN, KC_ASOFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PMNS,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| | | | | | | | | 1 | 2 | 3 | | |
|
||||
XXXXXXX, KC_ASTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, XXXXXXX,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
//| LOWER | | | | | | ESC | | ALT | | 0 | . | ENTER | = | |
|
||||
KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, KC_P0, KC_PDOT, KC_PENT, KC_PEQL, XXXXXXX,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
// | CTRL | COMMAND| BKSPACE | | SPACE | ENTER | SHIFT |
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
};
|
3
keyboards/iris/keymaps/gsigler/rules.mk
Normal file
3
keyboards/iris/keymaps/gsigler/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
AUTO_SHIFT_ENABLE = yes
|
@@ -1,60 +0,0 @@
|
||||
/**
|
||||
* Backlighting code for PS2AVRGB boards (ATMEGA32A)
|
||||
* Kenneth A. (github.com/krusli | krusli.me)
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
// Port D: digital pins of the AVR chipset
|
||||
#define NUMLOCK_PORT (1 << 0) // D0
|
||||
#define CAPSLOCK_PORT (1 << 1) // D1
|
||||
#define BACKLIGHT_PORT (1 << 4) // D4
|
||||
#define SCROLLLOCK_PORT (1 << 6) // D6
|
||||
|
||||
/**
|
||||
* References
|
||||
* Port Registers: https://www.arduino.cc/en/Reference/PortManipulation
|
||||
* TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b
|
||||
* Timers: http://www.avrbeginners.net/architecture/timers/timers.html
|
||||
* 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/
|
||||
* PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware
|
||||
*/
|
||||
|
||||
// @Override
|
||||
// turn LEDs on and off depending on USB caps/num/scroll lock states.
|
||||
__attribute__ ((weak))
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
/* It appears that these cause the v1 JJ40 PCB to hang.
|
||||
* I haven't looked into why, but I don't have any LEDs on my board anyway. */
|
||||
#if 0
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
// turn on
|
||||
DDRD |= NUMLOCK_PORT;
|
||||
PORTD |= NUMLOCK_PORT;
|
||||
} else {
|
||||
// turn off
|
||||
DDRD &= ~NUMLOCK_PORT;
|
||||
PORTD &= ~NUMLOCK_PORT;
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRD |= CAPSLOCK_PORT;
|
||||
PORTD |= CAPSLOCK_PORT;
|
||||
} else {
|
||||
DDRD &= ~CAPSLOCK_PORT;
|
||||
PORTD &= ~CAPSLOCK_PORT;
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRD |= SCROLLLOCK_PORT;
|
||||
PORTD |= SCROLLLOCK_PORT;
|
||||
} else {
|
||||
DDRD &= ~SCROLLLOCK_PORT;
|
||||
PORTD &= ~SCROLLLOCK_PORT;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Ins | | | () | [] | {} | Left | Down | Up |Right | | |
|
||||
* | Ins | | | () | [] | {} | Home | PgDn | PgUp | End | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |RESET | Back | Fwd | | | | | | Mute | Vol- | Vol+ | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
[_LOWER] = KEYMAP( \
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||
KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \
|
||||
RESET, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
|
||||
),
|
||||
|
35
keyboards/orange75/config.h
Normal file
35
keyboards/orange75/config.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEEB
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Fox-Lab
|
||||
#define PRODUCT Orange75
|
||||
#define DESCRIPTION Keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 15
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { E6,F0, F1, F4, F5, F6, F7, C7, C6, B6, B4, D7, D4, D5, D6 }
|
||||
#define MATRIX_COL_PINS { D3, D2, D1, D0, B7, B3 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B5
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
96
keyboards/orange75/info.json
Normal file
96
keyboards/orange75/info.json
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"keyboard_name": "Orange75",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 16,
|
||||
"height": 6.25,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"key_count": 82,
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0},
|
||||
{"label":"F1", "x":2, "y":0},
|
||||
{"label":"F2", "x":3, "y":0},
|
||||
{"label":"F3", "x":4, "y":0},
|
||||
{"label":"F4", "x":5, "y":0},
|
||||
{"label":"F5", "x":6.5, "y":0},
|
||||
{"label":"F6", "x":7.5, "y":0},
|
||||
{"label":"F7", "x":8.5, "y":0},
|
||||
{"label":"F8", "x":9.5, "y":0},
|
||||
{"label":"F9", "x":11, "y":0},
|
||||
{"label":"F10", "x":12, "y":0},
|
||||
{"label":"F11", "x":13, "y":0},
|
||||
{"label":"F12", "x":14, "y":0},
|
||||
{"label":"`", "x":0, "y":1.25},
|
||||
{"label":"1", "x":1, "y":1.25},
|
||||
{"label":"2", "x":2, "y":1.25},
|
||||
{"label":"3", "x":3, "y":1.25},
|
||||
{"label":"4", "x":4, "y":1.25},
|
||||
{"label":"5", "x":5, "y":1.25},
|
||||
{"label":"6", "x":6, "y":1.25},
|
||||
{"label":"7", "x":7, "y":1.25},
|
||||
{"label":"8", "x":8, "y":1.25},
|
||||
{"label":"9", "x":9, "y":1.25},
|
||||
{"label":"0", "x":10, "y":1.25},
|
||||
{"label":"-", "x":11, "y":1.25},
|
||||
{"label":"=", "x":12, "y":1.25},
|
||||
{"label":"Delete", "x":13, "y":1.25},
|
||||
{"label":"Back Space", "x":14, "y":1.25},
|
||||
{"label":"Home", "x":15, "y":1.25},
|
||||
{"label":"Tab", "x":0, "y":2.25, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":2.25},
|
||||
{"label":"W", "x":2.5, "y":2.25},
|
||||
{"label":"E", "x":3.5, "y":2.25},
|
||||
{"label":"R", "x":4.5, "y":2.25},
|
||||
{"label":"T", "x":5.5, "y":2.25},
|
||||
{"label":"Y", "x":6.5, "y":2.25},
|
||||
{"label":"U", "x":7.5, "y":2.25},
|
||||
{"label":"I", "x":8.5, "y":2.25},
|
||||
{"label":"O", "x":9.5, "y":2.25},
|
||||
{"label":"P", "x":10.5, "y":2.25},
|
||||
{"label":"[", "x":11.5, "y":2.25},
|
||||
{"label":"]", "x":12.5, "y":2.25},
|
||||
{"label":"\\", "x":13.5, "y":2.25, "w":1.5},
|
||||
{"label":"End", "x":15, "y":2.25},
|
||||
{"label":"Caps Lock", "x":0, "y":3.25, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":3.25},
|
||||
{"label":"S", "x":2.75, "y":3.25},
|
||||
{"label":"D", "x":3.75, "y":3.25},
|
||||
{"label":"F", "x":4.75, "y":3.25},
|
||||
{"label":"G", "x":5.75, "y":3.25},
|
||||
{"label":"H", "x":6.75, "y":3.25},
|
||||
{"label":"J", "x":7.75, "y":3.25},
|
||||
{"label":"K", "x":8.75, "y":3.25},
|
||||
{"label":"L", "x":9.75, "y":3.25},
|
||||
{"label":";", "x":10.75, "y":3.25},
|
||||
{"label":"'", "x":11.75, "y":3.25},
|
||||
{"label":"Enter", "x":12.75, "y":3.25, "w":2.25},
|
||||
{"label":"PgUp", "x":15, "y":3.25},
|
||||
{"label":"Shift", "x":0, "y":4.25, "w":1.25},
|
||||
{"label":"ISO\\", "x":1.25, "y":4.25},
|
||||
{"label":"Z", "x":2.25, "y":4.25},
|
||||
{"label":"X", "x":3.25, "y":4.25},
|
||||
{"label":"C", "x":4.25, "y":4.25},
|
||||
{"label":"V", "x":5.25, "y":4.25},
|
||||
{"label":"B", "x":6.25, "y":4.25},
|
||||
{"label":"N", "x":7.25, "y":4.25},
|
||||
{"label":"M", "x":8.25, "y":4.25},
|
||||
{"label":",", "x":9.25, "y":4.25},
|
||||
{"label":".", "x":10.25, "y":4.25},
|
||||
{"label":"/", "x":11.25, "y":4.25},
|
||||
{"label":"Shift", "x":12.25, "y":4.25, "w":1.75},
|
||||
{"label":"Up", "x":14, "y":4.25},
|
||||
{"label":"PgDn", "x":15, "y":4.25},
|
||||
{"label":"Ctrl", "x":0, "y":5.25, "w":1.25},
|
||||
{"label":"GUI", "x":1.25, "y":5.25, "w":1.25},
|
||||
{"label":"Alt", "x":2.5, "y":5.25, "w":1.25},
|
||||
{"label":"Space", "x":3.75, "y":5.25, "w":6.25},
|
||||
{"label":"Alt", "x":10, "y":5.25, "w":1.25},
|
||||
{"label":"Fn", "x":11.25, "y":5.25, "w":1.25},
|
||||
{"label":"Left", "x":13, "y":5.25},
|
||||
{"label":"Down", "x":14, "y":5.25},
|
||||
{"label":"Right", "x":15, "y":5.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
85
keyboards/orange75/keymaps/default/keymap.c
Normal file
85
keyboards/orange75/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,85 @@
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
* ,---------------------------------------------------------------.
|
||||
* |Esc|▓▓▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓▓▓|
|
||||
* |---------------------------------------------------------------|
|
||||
* |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Del|Bsp|Hm |
|
||||
* |---------------------------------------------------------------|
|
||||
* |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |End|
|
||||
* |---------------------------------------------------------------|
|
||||
* |Caps |A |S |D |F |G |H |J |K |L |; |' |Enter |PgU|
|
||||
* |---------------------------------------------------------------|
|
||||
* |Shft|\ |Z |X |C |V |B |N |M |, |. |/ |Shift |Up |PgD|
|
||||
* |---------------------------------------------------------------|
|
||||
* |Ctrl|GUI |Alt |Space |Alt |Fn |▓|Lt |Dn |Rt |
|
||||
* `---------------------------------------------------------------'
|
||||
*/
|
||||
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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
|
||||
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_PGUP,
|
||||
KC_LSFT, LT(1, KC_NO), 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,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, LT(1, KC_NO), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
/*
|
||||
* ,---------------------------------------------------------------.
|
||||
* |RST|▓▓▓| | | | |▓| | | | |▓| | | | |▓▓▓|
|
||||
* |---------------------------------------------------------------|
|
||||
* |` | | | | | | | | | | | | | | |Tog|
|
||||
* |---------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | |Stp|
|
||||
* |---------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | |BL+|
|
||||
* |---------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | |BL-|
|
||||
* |---------------------------------------------------------------|
|
||||
* | | | | | | |▓| | | |
|
||||
* `---------------------------------------------------------------'
|
||||
*/
|
||||
LAYOUT(
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_INC,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRB |= (1 << 0); PORTB &= ~(1 << 0);
|
||||
} else {
|
||||
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 1); PORTB &= ~(1 << 1);
|
||||
} else {
|
||||
DDRB &= ~(1 << 1); PORTB &= ~(1 << 1);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||
} else {
|
||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||
}
|
||||
}
|
1
keyboards/orange75/orange75.c
Normal file
1
keyboards/orange75/orange75.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "orange75.h"
|
29
keyboards/orange75/orange75.h
Normal file
29
keyboards/orange75/orange75.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K014, K113, K114, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \
|
||||
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \
|
||||
K500, K501, K502, K506, K510, K511, K512, K513, K514 \
|
||||
) { \
|
||||
{ K000, K100, K200, K300, K400, K500 }, \
|
||||
{ KC_NO, K101, K201, K301, K401, K501 }, \
|
||||
{ K002, K102, K202, K302, K402, K502 }, \
|
||||
{ K003, K103, K203, K303, K403, KC_NO}, \
|
||||
{ K004, K104, K204, K304, K404, KC_NO}, \
|
||||
{ K005, K105, K205, K305, K405, KC_NO}, \
|
||||
{ K006, K106, K206, K306, K406, K506 }, \
|
||||
{ K007, K107, K207, K307, K407, KC_NO}, \
|
||||
{ K008, K108, K208, K308, K408, KC_NO}, \
|
||||
{ K009, K109, K209, K309, K409, KC_NO}, \
|
||||
{ K010, K110, K210, K310, K410, K510 }, \
|
||||
{ K011, K111, K211, K311, K411, K511 }, \
|
||||
{ K012, K112, K212, K312, K412, K512 }, \
|
||||
{ K013, K113, K213, KC_NO,K413, K513 }, \
|
||||
{ K014, K114, K214, K314, K414, K514 } \
|
||||
}
|
||||
|
16
keyboards/orange75/readme.md
Normal file
16
keyboards/orange75/readme.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Orange75
|
||||
|
||||

|
||||
|
||||
A 75% made by Fox Lab.
|
||||
|
||||
Keyboard Maintainer: [captsis](https://github.com/captsis), [fox-lab](https://github.com/fox-lab)
|
||||
Hardware Supported: Orange75 powered by the ATmega32U4
|
||||
Hardware Availability: [zFrontier](https://en.zfrontier.com/collections/keyboards/products/foxlab-orange75), [Geekhack GB](https://geekhack.org/index.php?topic=95080.0)
|
||||
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make orange75: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).
|
73
keyboards/orange75/rules.mk
Normal file
73
keyboards/orange75/rules.mk
Normal file
@@ -0,0 +1,73 @@
|
||||
# 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
|
||||
|
||||
|
||||
# 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
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
@@ -1,7 +1,4 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
#pragma once
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
@@ -40,4 +37,3 @@
|
||||
// Most tactile encoders have detents every 4 stages
|
||||
#define ENCODER_RESOLUTION 4
|
||||
|
||||
#endif
|
||||
|
@@ -14,8 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
@@ -276,11 +275,21 @@ void encoder_update(bool clockwise) {
|
||||
}
|
||||
} else {
|
||||
if (clockwise) {
|
||||
register_code(KC_PGDN);
|
||||
unregister_code(KC_PGDN);
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
register_code(KC_MS_WH_DOWN);
|
||||
unregister_code(KC_MS_WH_DOWN);
|
||||
#else
|
||||
register_code(KC_PGDN);
|
||||
unregister_code(KC_PGDN);
|
||||
#endif
|
||||
} else {
|
||||
register_code(KC_PGUP);
|
||||
unregister_code(KC_PGUP);
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
register_code(KC_MS_WH_UP);
|
||||
unregister_code(KC_MS_WH_UP);
|
||||
#else
|
||||
register_code(KC_PGUP);
|
||||
unregister_code(KC_PGUP);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
107
keyboards/tada68/keymaps/cheese/keymap.c
Executable file
107
keyboards/tada68/keymaps/cheese/keymap.c
Executable file
@@ -0,0 +1,107 @@
|
||||
#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 _BL 0
|
||||
#define _FL 1
|
||||
#define _CL 2
|
||||
#define _AL 3
|
||||
|
||||
enum custom_keycodes {
|
||||
SPX4 = SAFE_RANGE
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case SPX4:
|
||||
SEND_STRING(" ");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: (Base Layer) Default Layer
|
||||
* ,----------------------------------------------------------------.
|
||||
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` |
|
||||
* |----------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp|
|
||||
* |----------------------------------------------------------------|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn|
|
||||
* |----------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|Del |
|
||||
* |----------------------------------------------------------------|
|
||||
* |Ctrl|Win |Win | Space |Win| FN|Ctrl|Lef|Dow|Rig |
|
||||
* `----------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT_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_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_PGUP, \
|
||||
MO(_CL), 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_PGDN, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \
|
||||
KC_LCTL, KC_LALT,LM(_AL,0x08), KC_SPC, LM(_AL,0x18),MO(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
* ,----------------------------------------------------------------.
|
||||
* | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |` ~ |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | |Up | | | | | | | | | | | |Hme |
|
||||
* |----------------------------------------------------------------|
|
||||
* | |<- |Dn | ->| | | | | | | | | |End |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | |Bl-|BL |BL+| |MUT|VU-|VU+| | | | |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | | | | | | | |
|
||||
* `----------------------------------------------------------------'
|
||||
*/
|
||||
[_FL] = LAYOUT_ansi(
|
||||
_______, 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, \
|
||||
SPX4,_______, KC_UP,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \
|
||||
_______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \
|
||||
_______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_MUTE,KC_VOLD,KC_VOLU,_______,_______, _______, _______, \
|
||||
_______,_______,_______, _______, _______,_______,_______,_______,_______, _______),
|
||||
|
||||
/* Keymap _CL: Caps Layer
|
||||
* ,----------------------------------------------------------------.
|
||||
* | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |` ~ |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | |Up | | | | | | | | | | | |Hme |
|
||||
* |----------------------------------------------------------------|
|
||||
* | |<- |Dn | ->| | | | | | | | | |End |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | |Bl-|BL |BL+| |MUT|VU-|VU+| | McL|MsU|McR |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | | | | |MsL|MsD|MsR |
|
||||
* `----------------------------------------------------------------'
|
||||
*/
|
||||
[_CL] = LAYOUT_ansi(
|
||||
_______, 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_UP,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \
|
||||
_______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \
|
||||
_______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_MUTE,KC_VOLD,KC_VOLU,_______,KC_BTN1, KC_MS_U, KC_BTN2, \
|
||||
_______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D, KC_MS_R),
|
||||
|
||||
/* Keymap _AL: ALT Layer
|
||||
* ,----------------------------------------------------------------.
|
||||
* |` ~| | | | | | | | | | | | | | ` ~|
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | | | | | | | |
|
||||
* `----------------------------------------------------------------'
|
||||
*/
|
||||
[_AL] = LAYOUT_ansi(
|
||||
KC_GRV, _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GRV , \
|
||||
_______,_______, _______, _______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \
|
||||
_______,_______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \
|
||||
_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, \
|
||||
_______,_______,_______, _______, _______,_______,_______, _______, _______, _______),
|
||||
};
|
20
keyboards/tada68/keymaps/cheese/readme.md
Executable file
20
keyboards/tada68/keymaps/cheese/readme.md
Executable file
@@ -0,0 +1,20 @@
|
||||
# pgillan's Cheese TADA68 layout
|
||||
|
||||
A collection of tweaks to make the keyboard more mac friendly and increase personal usability,
|
||||
based on the default keymap.
|
||||
|
||||
* Turned the caps-lock into an additional function key so I didn't have to try to hit the
|
||||
the keys on the right with one hand.
|
||||
* Moved the arrow/mouse controls to the caps-lock layer from the function layer.
|
||||
* Swapped the Windows key and Alt keys, I didn't have to do it in OS X.
|
||||
* Made the escape key work as a backtick when "Alt" is depressed, so I can 1) reverse
|
||||
direction when I Alt-Tab through current applications, and Alt-Backtick through
|
||||
open windows.
|
||||
* Turned the backtick/tilde key into another backspace key, so I can just go all the way
|
||||
up to the corner without overshooting.
|
||||
* Adjusted the volume controles so M is "mute", the "," ( or "<") is "down", and "." (or ">")
|
||||
is "up". It just makes a ton more sense, I have no idea why it would have been done any
|
||||
differently.
|
||||
* Moved PageUp/PageDown up above the delete key, and made the Home and End on the capslock
|
||||
and function layers.
|
||||
* Made the tab key on the function layer output 4 spaces instead of a tab character.
|
18
keyboards/tada68/keymaps/cheese/rules.mk
Normal file
18
keyboards/tada68/keymaps/cheese/rules.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
@@ -46,7 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
#define BACKLIGHT_PIN B5
|
||||
// #define BACKLIGHT_BREATHING
|
||||
|
81
quantum/keymap_extras/sendstring_german.h
Normal file
81
quantum/keymap_extras/sendstring_german.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/* Copyright 2018 Patrick Hener
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
/* Sendstring definitions for the German layout */
|
||||
#ifndef SENDSTRING_GERMAN
|
||||
#define SENDSTRING_GERMAN
|
||||
|
||||
#include "keymap_german.h"
|
||||
|
||||
const bool ascii_to_shift_lut[0x80] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
0, 1, 1, 0, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 1, 0, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 0, 1,
|
||||
1, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 1, 1, 1, 0
|
||||
};
|
||||
|
||||
/* Until an ALT table/functionality is added, the following symbols will not work:
|
||||
* § @ [ ] { } \ ~ äA öÖ ß ´
|
||||
* Following characters can be printed using other characters like so:
|
||||
* [ in makro will be ü
|
||||
* { in makro will be Ü
|
||||
* ~ in makro will be °
|
||||
*/
|
||||
const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, KC_ESC, 0, 0, 0, 0,
|
||||
|
||||
/* SPACE ! " # $ % & ' */
|
||||
KC_SPC, KC_1, KC_2, DE_HASH, KC_4, KC_5, KC_6, DE_HASH,
|
||||
/* ( ) * + , - . / */
|
||||
KC_8, KC_9, DE_PLUS, DE_PLUS, KC_COMM, DE_MINS, KC_DOT, KC_7,
|
||||
/* 0 1 2 3 4 5 6 7 */
|
||||
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
|
||||
/* 8 9 : ; < = > ? */
|
||||
KC_8, KC_9, KC_DOT, KC_COMM, DE_LESS, KC_0, DE_LESS, KC_MINS,
|
||||
/* @ A B C D E F G */
|
||||
KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
|
||||
/* H I J K L M N O */
|
||||
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
|
||||
/* P Q R S T U V W */
|
||||
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
|
||||
/* X Y Z [ \ ] ^ _ */
|
||||
KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, DE_CIRC, DE_MINS,
|
||||
/* ` a b c d e f g */
|
||||
DE_ACUT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
|
||||
/* h i j k l m n o */
|
||||
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
|
||||
/* p q r s t u v w */
|
||||
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
|
||||
/* x y z { | } ~ DELETE */
|
||||
KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL
|
||||
};
|
||||
|
||||
#endif
|
@@ -18,6 +18,52 @@
|
||||
|
||||
#include "rgblight_reconfig.h"
|
||||
|
||||
/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) ****
|
||||
|
||||
old mode number (before 0.6.117) to new mode name table
|
||||
|
||||
|-----------------|-----------------------------------|
|
||||
| old mode number | new mode name |
|
||||
|-----------------|-----------------------------------|
|
||||
| 1 | RGBLIGHT_MODE_STATIC_LIGHT |
|
||||
| 2 | RGBLIGHT_MODE_BREATHING |
|
||||
| 3 | RGBLIGHT_MODE_BREATHING + 1 |
|
||||
| 4 | RGBLIGHT_MODE_BREATHING + 2 |
|
||||
| 5 | RGBLIGHT_MODE_BREATHING + 3 |
|
||||
| 6 | RGBLIGHT_MODE_RAINBOW_MOOD |
|
||||
| 7 | RGBLIGHT_MODE_RAINBOW_MOOD + 1 |
|
||||
| 8 | RGBLIGHT_MODE_RAINBOW_MOOD + 2 |
|
||||
| 9 | RGBLIGHT_MODE_RAINBOW_SWIRL |
|
||||
| 10 | RGBLIGHT_MODE_RAINBOW_SWIRL + 1 |
|
||||
| 11 | RGBLIGHT_MODE_RAINBOW_SWIRL + 2 |
|
||||
| 12 | RGBLIGHT_MODE_RAINBOW_SWIRL + 3 |
|
||||
| 13 | RGBLIGHT_MODE_RAINBOW_SWIRL + 4 |
|
||||
| 14 | RGBLIGHT_MODE_RAINBOW_SWIRL + 5 |
|
||||
| 15 | RGBLIGHT_MODE_SNAKE |
|
||||
| 16 | RGBLIGHT_MODE_SNAKE + 1 |
|
||||
| 17 | RGBLIGHT_MODE_SNAKE + 2 |
|
||||
| 18 | RGBLIGHT_MODE_SNAKE + 3 |
|
||||
| 19 | RGBLIGHT_MODE_SNAKE + 4 |
|
||||
| 20 | RGBLIGHT_MODE_SNAKE + 5 |
|
||||
| 21 | RGBLIGHT_MODE_KNIGHT |
|
||||
| 22 | RGBLIGHT_MODE_KNIGHT + 1 |
|
||||
| 23 | RGBLIGHT_MODE_KNIGHT + 2 |
|
||||
| 24 | RGBLIGHT_MODE_CHRISTMAS |
|
||||
| 25 | RGBLIGHT_MODE_STATIC_GRADIENT |
|
||||
| 26 | RGBLIGHT_MODE_STATIC_GRADIENT + 1 |
|
||||
| 27 | RGBLIGHT_MODE_STATIC_GRADIENT + 2 |
|
||||
| 28 | RGBLIGHT_MODE_STATIC_GRADIENT + 3 |
|
||||
| 29 | RGBLIGHT_MODE_STATIC_GRADIENT + 4 |
|
||||
| 30 | RGBLIGHT_MODE_STATIC_GRADIENT + 5 |
|
||||
| 31 | RGBLIGHT_MODE_STATIC_GRADIENT + 6 |
|
||||
| 32 | RGBLIGHT_MODE_STATIC_GRADIENT + 7 |
|
||||
| 33 | RGBLIGHT_MODE_STATIC_GRADIENT + 8 |
|
||||
| 34 | RGBLIGHT_MODE_STATIC_GRADIENT + 9 |
|
||||
| 35 | RGBLIGHT_MODE_RGB_TEST |
|
||||
| 36 | RGBLIGHT_MODE_ALTERNATING |
|
||||
|-----------------|-----------------------------------|
|
||||
*****/
|
||||
|
||||
#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_ ## sym,
|
||||
#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_ ## sym,
|
||||
#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_ ## sym,
|
||||
@@ -238,6 +284,10 @@ void rgblight_effect_alternating(void);
|
||||
#ifdef RGBLIGHT_EFFECT_ALTERNATING
|
||||
_RGBM_SINGLE_DYNAMIC( ALTERNATING )
|
||||
#endif
|
||||
//// Add a new mode here.
|
||||
// #ifdef RGBLIGHT_EFFECT_<name>
|
||||
// _RGBM_<SINGLE|MULTI>_<STATIC|DYNAMIC>( <name> )
|
||||
// #endif
|
||||
#endif
|
||||
|
||||
#undef _RGBM_SINGLE_STATIC
|
||||
|
@@ -43,6 +43,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),ARM_ATSAM)
|
||||
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
|
||||
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
|
||||
endif
|
||||
|
||||
|
66
tmk_core/common/arm_atsam/printf.c
Normal file
66
tmk_core/common/arm_atsam/printf.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
Copyright 2018 Massdrop Inc.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifdef CONSOLE_PRINT
|
||||
|
||||
#include "samd51j18a.h"
|
||||
#include "arm_atsam_protocol.h"
|
||||
#include "printf.h"
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
void console_printf(char *fmt, ...) {
|
||||
while (udi_hid_con_b_report_trans_ongoing) {} //Wait for any previous transfers to complete
|
||||
|
||||
static char console_printbuf[CONSOLE_PRINTBUF_SIZE]; //Print and send buffer
|
||||
va_list va;
|
||||
int result;
|
||||
|
||||
va_start(va, fmt);
|
||||
result = vsnprintf(console_printbuf, CONSOLE_PRINTBUF_SIZE, fmt, va);
|
||||
va_end(va);
|
||||
|
||||
uint32_t irqflags;
|
||||
char *pconbuf = console_printbuf; //Pointer to start send from
|
||||
int send_out = CONSOLE_EPSIZE; //Bytes to send per transfer
|
||||
|
||||
while (result > 0) { //While not error and bytes remain
|
||||
while (udi_hid_con_b_report_trans_ongoing) {} //Wait for any previous transfers to complete
|
||||
|
||||
irqflags = __get_PRIMASK();
|
||||
__disable_irq();
|
||||
__DMB();
|
||||
|
||||
if (result < CONSOLE_EPSIZE) { //If remaining bytes are less than console epsize
|
||||
memset(udi_hid_con_report, 0, CONSOLE_EPSIZE); //Clear the buffer
|
||||
send_out = result; //Send remaining size
|
||||
}
|
||||
|
||||
memcpy(udi_hid_con_report, pconbuf, send_out); //Copy data into the send buffer
|
||||
|
||||
udi_hid_con_b_report_valid = 1; //Set report valid
|
||||
udi_hid_con_send_report(); //Send report
|
||||
|
||||
__DMB();
|
||||
__set_PRIMASK(irqflags);
|
||||
|
||||
result -= send_out; //Decrement result by bytes sent
|
||||
pconbuf += send_out; //Increment buffer point by bytes sent
|
||||
}
|
||||
}
|
||||
|
||||
#endif //CONSOLE_PRINT
|
@@ -1,8 +1,11 @@
|
||||
#ifndef _PRINTF_H_
|
||||
#define _PRINTF_H_
|
||||
|
||||
int dpf(const char *_Format, ...);
|
||||
#define __xprintf dpf
|
||||
#define CONSOLE_PRINTBUF_SIZE 512
|
||||
|
||||
void console_printf(char *fmt, ...);
|
||||
|
||||
#define __xprintf console_printf
|
||||
|
||||
#endif //_PRINTF_H_
|
||||
|
||||
|
@@ -276,9 +276,9 @@ int main(void)
|
||||
|
||||
host_set_driver(&arm_atsam_driver);
|
||||
|
||||
#ifdef VIRTSER_ENABLE
|
||||
#ifdef CONSOLE_ENABLE
|
||||
uint64_t next_print = 0;
|
||||
#endif //VIRTSER_ENABLE
|
||||
#endif //CONSOLE_ENABLE
|
||||
|
||||
v_5v_avg = adc_get(ADC_5V);
|
||||
|
||||
@@ -290,15 +290,17 @@ int main(void)
|
||||
|
||||
main_subtasks(); //Note these tasks will also be run while waiting for USB keyboard polling intervals
|
||||
|
||||
#ifdef VIRTSER_ENABLE
|
||||
#ifdef CONSOLE_ENABLE
|
||||
if (CLK_get_ms() > next_print)
|
||||
{
|
||||
next_print = CLK_get_ms() + 250;
|
||||
dprintf("5v=%u 5vu=%u dlow=%u dhi=%u gca=%u gcd=%u\r\n",v_5v,v_5v_avg,v_5v_avg-V5_LOW,v_5v_avg-V5_HIGH,gcr_actual,gcr_desired);
|
||||
//Add any debug information here that you want to see very often
|
||||
//dprintf("5v=%u 5vu=%u dlow=%u dhi=%u gca=%u gcd=%u\r\n", v_5v, v_5v_avg, v_5v_avg - V5_LOW, v_5v_avg - V5_HIGH, gcr_actual, gcr_desired);
|
||||
}
|
||||
#endif //VIRTSER_ENABLE
|
||||
#endif //CONSOLE_ENABLE
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -134,6 +134,11 @@
|
||||
#define UDI_HID_EXK_DISABLE_EXT() main_exk_disable()
|
||||
#endif
|
||||
|
||||
#ifdef CON
|
||||
#define UDI_HID_CON_ENABLE_EXT() main_con_enable()
|
||||
#define UDI_HID_CON_DISABLE_EXT() main_con_disable()
|
||||
#endif
|
||||
|
||||
#ifdef MOU
|
||||
#define UDI_HID_MOU_ENABLE_EXT() main_mou_enable()
|
||||
#define UDI_HID_MOU_DISABLE_EXT() main_mou_disable()
|
||||
|
@@ -88,6 +88,20 @@ void main_exk_disable(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CON
|
||||
volatile bool main_b_con_enable = false;
|
||||
bool main_con_enable(void)
|
||||
{
|
||||
main_b_con_enable = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void main_con_disable(void)
|
||||
{
|
||||
main_b_con_enable = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOU
|
||||
volatile bool main_b_mou_enable = false;
|
||||
bool main_mou_enable(void)
|
||||
|
@@ -1260,7 +1260,7 @@ uint32_t CDC_print(char *printbuf)
|
||||
|
||||
char printbuf[CDC_PRINTBUF_SIZE];
|
||||
|
||||
int dpf(const char *_Format, ...)
|
||||
int CDC_printf(const char *_Format, ...)
|
||||
{
|
||||
va_list va; //Variable argument list variable
|
||||
int result;
|
||||
@@ -1356,7 +1356,7 @@ uint32_t CDC_print(char *printbuf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dpf(const char *_Format, ...)
|
||||
int CDC_printf(const char *_Format, ...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -365,6 +365,7 @@ extern inbuf_t inbuf;
|
||||
#endif //CDC
|
||||
|
||||
uint32_t CDC_print(char *printbuf);
|
||||
int CDC_printf(const char *_Format, ...);
|
||||
uint32_t CDC_input(void);
|
||||
void CDC_init(void);
|
||||
|
||||
|
@@ -44,10 +44,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RAW
|
||||
#endif
|
||||
|
||||
//#define CONSOLE_ENABLE //deferred implementation
|
||||
//#ifdef CONSOLE_ENABLE
|
||||
//#define CON
|
||||
//#endif
|
||||
//#define CONSOLE_ENABLE //rules.mk
|
||||
#ifdef CONSOLE_ENABLE
|
||||
#define CON
|
||||
#endif
|
||||
|
||||
//#define NKRO_ENABLE //rules.mk
|
||||
#ifdef NKRO_ENABLE
|
||||
@@ -110,8 +110,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endif
|
||||
|
||||
#ifdef CON
|
||||
#define CONSOLE_INTERFACE NEXT_INTERFACE_4
|
||||
#define NEXT_INTERFACE_5 (CONSOLE_INTERFACE + 1)
|
||||
#define CON_INTERFACE NEXT_INTERFACE_4
|
||||
#define NEXT_INTERFACE_5 (CON_INTERFACE + 1)
|
||||
#define UDI_HID_CON_IFACE_NUMBER CON_INTERFACE
|
||||
#else
|
||||
#define NEXT_INTERFACE_5 NEXT_INTERFACE_4
|
||||
#endif
|
||||
@@ -211,11 +212,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endif
|
||||
|
||||
#ifdef CON
|
||||
#define CONSOLE_IN_EPNUM NEXT_IN_EPNUM_4
|
||||
#define NEXT_IN_EPNUM_5 (CONSOLE_IN_EPNUM + 1)
|
||||
#define CONSOLE_OUT_EPNUM NEXT_OUT_EPNUM_1
|
||||
#define NEXT_OUT_EPNUM_2 (CONSOLE_OUT_EPNUM + 1)
|
||||
#define CONSOLE_POLLING_INTERVAL 1
|
||||
#define CON_IN_EPNUM NEXT_IN_EPNUM_4
|
||||
#define UDI_HID_CON_EP_IN CON_IN_EPNUM
|
||||
#define NEXT_IN_EPNUM_5 (CON_IN_EPNUM + 1)
|
||||
#define CON_OUT_EPNUM NEXT_OUT_EPNUM_1
|
||||
#define UDI_HID_CON_EP_OUT CON_OUT_EPNUM
|
||||
#define NEXT_OUT_EPNUM_2 (CON_OUT_EPNUM + 1)
|
||||
#define CON_POLLING_INTERVAL 1
|
||||
#ifndef UDI_HID_CON_STRING_ID
|
||||
#define UDI_HID_CON_STRING_ID 0
|
||||
#endif
|
||||
#else
|
||||
#define NEXT_IN_EPNUM_5 NEXT_IN_EPNUM_4
|
||||
#define NEXT_OUT_EPNUM_2 NEXT_OUT_EPNUM_1
|
||||
@@ -558,6 +564,66 @@ COMPILER_PACK_RESET()
|
||||
|
||||
#endif //RAW
|
||||
|
||||
// **********************************************************************
|
||||
// CON Descriptor structure and content
|
||||
// **********************************************************************
|
||||
#ifdef CON
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
typedef struct {
|
||||
usb_iface_desc_t iface;
|
||||
usb_hid_descriptor_t hid;
|
||||
usb_ep_desc_t ep_out;
|
||||
usb_ep_desc_t ep_in;
|
||||
} udi_hid_con_desc_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t array[34];
|
||||
} udi_hid_con_report_desc_t;
|
||||
|
||||
#define UDI_HID_CON_DESC {\
|
||||
.iface.bLength = sizeof(usb_iface_desc_t),\
|
||||
.iface.bDescriptorType = USB_DT_INTERFACE,\
|
||||
.iface.bInterfaceNumber = UDI_HID_CON_IFACE_NUMBER,\
|
||||
.iface.bAlternateSetting = 0,\
|
||||
.iface.bNumEndpoints = 2,\
|
||||
.iface.bInterfaceClass = HID_CLASS,\
|
||||
.iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT,\
|
||||
.iface.bInterfaceProtocol = HID_SUB_CLASS_NOBOOT,\
|
||||
.iface.iInterface = UDI_HID_CON_STRING_ID,\
|
||||
.hid.bLength = sizeof(usb_hid_descriptor_t),\
|
||||
.hid.bDescriptorType = USB_DT_HID,\
|
||||
.hid.bcdHID = LE16(USB_HID_BDC_V1_11),\
|
||||
.hid.bCountryCode = USB_HID_NO_COUNTRY_CODE,\
|
||||
.hid.bNumDescriptors = USB_HID_NUM_DESC,\
|
||||
.hid.bRDescriptorType = USB_DT_HID_REPORT,\
|
||||
.hid.wDescriptorLength = LE16(sizeof(udi_hid_con_report_desc_t)),\
|
||||
.ep_out.bLength = sizeof(usb_ep_desc_t),\
|
||||
.ep_out.bDescriptorType = USB_DT_ENDPOINT,\
|
||||
.ep_out.bEndpointAddress = UDI_HID_CON_EP_OUT | USB_EP_DIR_OUT,\
|
||||
.ep_out.bmAttributes = USB_EP_TYPE_INTERRUPT,\
|
||||
.ep_out.wMaxPacketSize = LE16(CONSOLE_EPSIZE),\
|
||||
.ep_out.bInterval = CON_POLLING_INTERVAL,\
|
||||
.ep_in.bLength = sizeof(usb_ep_desc_t),\
|
||||
.ep_in.bDescriptorType = USB_DT_ENDPOINT,\
|
||||
.ep_in.bEndpointAddress = UDI_HID_CON_EP_IN | USB_EP_DIR_IN,\
|
||||
.ep_in.bmAttributes = USB_EP_TYPE_INTERRUPT,\
|
||||
.ep_in.wMaxPacketSize = LE16(CONSOLE_EPSIZE),\
|
||||
.ep_in.bInterval = CON_POLLING_INTERVAL,\
|
||||
}
|
||||
|
||||
#define UDI_HID_CON_REPORT_SIZE CONSOLE_EPSIZE
|
||||
|
||||
extern uint8_t udi_hid_con_report_set[UDI_HID_CON_REPORT_SIZE];
|
||||
|
||||
//report buffer
|
||||
extern uint8_t udi_hid_con_report[UDI_HID_CON_REPORT_SIZE];
|
||||
|
||||
COMPILER_PACK_RESET()
|
||||
|
||||
#endif //CON
|
||||
|
||||
// **********************************************************************
|
||||
// CDC Descriptor structure and content
|
||||
// **********************************************************************
|
||||
|
@@ -843,3 +843,149 @@ static void udi_hid_raw_setreport_valid(void)
|
||||
}
|
||||
|
||||
#endif //RAW
|
||||
|
||||
//********************************************************************************************
|
||||
// CON
|
||||
//********************************************************************************************
|
||||
#ifdef CON
|
||||
|
||||
bool udi_hid_con_enable(void);
|
||||
void udi_hid_con_disable(void);
|
||||
bool udi_hid_con_setup(void);
|
||||
uint8_t udi_hid_con_getsetting(void);
|
||||
|
||||
UDC_DESC_STORAGE udi_api_t udi_api_hid_con = {
|
||||
.enable = (bool(*)(void))udi_hid_con_enable,
|
||||
.disable = (void (*)(void))udi_hid_con_disable,
|
||||
.setup = (bool(*)(void))udi_hid_con_setup,
|
||||
.getsetting = (uint8_t(*)(void))udi_hid_con_getsetting,
|
||||
.sof_notify = NULL,
|
||||
};
|
||||
|
||||
COMPILER_WORD_ALIGNED
|
||||
static uint8_t udi_hid_con_rate;
|
||||
|
||||
COMPILER_WORD_ALIGNED
|
||||
static uint8_t udi_hid_con_protocol;
|
||||
|
||||
COMPILER_WORD_ALIGNED
|
||||
uint8_t udi_hid_con_report_set[UDI_HID_CON_REPORT_SIZE];
|
||||
|
||||
bool udi_hid_con_b_report_valid;
|
||||
|
||||
COMPILER_WORD_ALIGNED
|
||||
uint8_t udi_hid_con_report[UDI_HID_CON_REPORT_SIZE];
|
||||
|
||||
volatile bool udi_hid_con_b_report_trans_ongoing;
|
||||
|
||||
COMPILER_WORD_ALIGNED
|
||||
static uint8_t udi_hid_con_report_trans[UDI_HID_CON_REPORT_SIZE];
|
||||
|
||||
COMPILER_WORD_ALIGNED
|
||||
UDC_DESC_STORAGE udi_hid_con_report_desc_t udi_hid_con_report_desc = {
|
||||
{
|
||||
0x06, 0x31, 0xFF, // Vendor Page (PJRC Teensy compatible)
|
||||
0x09, 0x74, // Vendor Usage (PJRC Teensy compatible)
|
||||
0xA1, 0x01, // Collection (Application)
|
||||
0x09, 0x75, // Usage (Vendor)
|
||||
0x15, 0x00, // Logical Minimum (0x00)
|
||||
0x26, 0xFF, 0x00, // Logical Maximum (0x00FF)
|
||||
0x95, CONSOLE_EPSIZE, // Report Count
|
||||
0x75, 0x08, // Report Size (8)
|
||||
0x81, 0x02, // Input (Data)
|
||||
0x09, 0x76, // Usage (Vendor)
|
||||
0x15, 0x00, // Logical Minimum (0x00)
|
||||
0x26, 0xFF, 0x00, // Logical Maximum (0x00FF)
|
||||
0x95, CONSOLE_EPSIZE, // Report Count
|
||||
0x75, 0x08, // Report Size (8)
|
||||
0x91, 0x02, // Output (Data)
|
||||
0xC0, // End Collection
|
||||
}
|
||||
};
|
||||
|
||||
static bool udi_hid_con_setreport(void);
|
||||
static void udi_hid_con_setreport_valid(void);
|
||||
|
||||
static void udi_hid_con_report_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep);
|
||||
|
||||
bool udi_hid_con_enable(void)
|
||||
{
|
||||
// Initialize internal values
|
||||
udi_hid_con_rate = 0;
|
||||
udi_hid_con_protocol = 0;
|
||||
udi_hid_con_b_report_trans_ongoing = false;
|
||||
memset(udi_hid_con_report, 0, UDI_HID_CON_REPORT_SIZE);
|
||||
udi_hid_con_b_report_valid = false;
|
||||
return UDI_HID_CON_ENABLE_EXT();
|
||||
}
|
||||
|
||||
void udi_hid_con_disable(void)
|
||||
{
|
||||
UDI_HID_CON_DISABLE_EXT();
|
||||
}
|
||||
|
||||
bool udi_hid_con_setup(void)
|
||||
{
|
||||
return udi_hid_setup(&udi_hid_con_rate,
|
||||
&udi_hid_con_protocol,
|
||||
(uint8_t *) &udi_hid_con_report_desc,
|
||||
udi_hid_con_setreport);
|
||||
}
|
||||
|
||||
uint8_t udi_hid_con_getsetting(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool udi_hid_con_setreport(void)
|
||||
{
|
||||
if ((USB_HID_REPORT_TYPE_OUTPUT == (udd_g_ctrlreq.req.wValue >> 8))
|
||||
&& (0 == (0xFF & udd_g_ctrlreq.req.wValue))
|
||||
&& (UDI_HID_CON_REPORT_SIZE == udd_g_ctrlreq.req.wLength)) {
|
||||
udd_g_ctrlreq.payload = udi_hid_con_report_set;
|
||||
udd_g_ctrlreq.callback = udi_hid_con_setreport_valid;
|
||||
udd_g_ctrlreq.payload_size = UDI_HID_CON_REPORT_SIZE;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool udi_hid_con_send_report(void)
|
||||
{
|
||||
if (!main_b_con_enable) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (udi_hid_con_b_report_trans_ongoing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(udi_hid_con_report_trans, udi_hid_con_report,UDI_HID_CON_REPORT_SIZE);
|
||||
udi_hid_con_b_report_valid = false;
|
||||
udi_hid_con_b_report_trans_ongoing =
|
||||
udd_ep_run(UDI_HID_CON_EP_IN | USB_EP_DIR_IN,
|
||||
false,
|
||||
udi_hid_con_report_trans,
|
||||
UDI_HID_CON_REPORT_SIZE,
|
||||
udi_hid_con_report_sent);
|
||||
|
||||
return udi_hid_con_b_report_trans_ongoing;
|
||||
}
|
||||
|
||||
static void udi_hid_con_report_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep)
|
||||
{
|
||||
UNUSED(status);
|
||||
UNUSED(nb_sent);
|
||||
UNUSED(ep);
|
||||
udi_hid_con_b_report_trans_ongoing = false;
|
||||
if (udi_hid_con_b_report_valid) {
|
||||
udi_hid_con_send_report();
|
||||
}
|
||||
}
|
||||
|
||||
static void udi_hid_con_setreport_valid(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif //CON
|
||||
|
@@ -85,6 +85,17 @@ extern uint8_t udi_hid_exk_report_set;
|
||||
bool udi_hid_exk_send_report(void);
|
||||
#endif //EXK
|
||||
|
||||
//********************************************************************************************
|
||||
// CON Console
|
||||
//********************************************************************************************
|
||||
#ifdef CON
|
||||
extern UDC_DESC_STORAGE udi_api_t udi_api_hid_con;
|
||||
extern bool udi_hid_con_b_report_valid;
|
||||
extern uint8_t udi_hid_con_report_set[UDI_HID_CON_REPORT_SIZE];
|
||||
extern volatile bool udi_hid_con_b_report_trans_ongoing;
|
||||
bool udi_hid_con_send_report(void);
|
||||
#endif //CON
|
||||
|
||||
//********************************************************************************************
|
||||
// MOU Mouse
|
||||
//********************************************************************************************
|
||||
|
@@ -134,6 +134,9 @@ UDC_DESC_STORAGE udc_desc_t udc_desc = {
|
||||
#ifdef EXK
|
||||
.hid_exk = UDI_HID_EXK_DESC,
|
||||
#endif
|
||||
#ifdef CON
|
||||
.hid_con = UDI_HID_CON_DESC,
|
||||
#endif
|
||||
#ifdef NKRO
|
||||
.hid_nkro = UDI_HID_NKRO_DESC,
|
||||
#endif
|
||||
@@ -155,6 +158,9 @@ UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
|
||||
#ifdef EXK
|
||||
&udi_api_hid_exk,
|
||||
#endif
|
||||
#ifdef CON
|
||||
&udi_api_hid_con,
|
||||
#endif
|
||||
#ifdef NKRO
|
||||
&udi_api_hid_nkro,
|
||||
#endif
|
||||
|
@@ -82,6 +82,12 @@ bool main_exk_enable(void);
|
||||
void main_exk_disable(void);
|
||||
#endif //EXK
|
||||
|
||||
#ifdef CON
|
||||
extern volatile bool main_b_con_enable;
|
||||
bool main_con_enable(void);
|
||||
void main_con_disable(void);
|
||||
#endif //CON
|
||||
|
||||
#ifdef MOU
|
||||
extern volatile bool main_b_mou_enable;
|
||||
bool main_mou_enable(void);
|
||||
|
Reference in New Issue
Block a user