mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-10 20:25:56 +00:00
Compare commits
78 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
55c3214877 | ||
![]() |
dd7534ccca | ||
![]() |
e4dfcf896e | ||
![]() |
82c02d9b8d | ||
![]() |
d79b5e67b6 | ||
![]() |
90f9fb4eee | ||
![]() |
77ed9e3a73 | ||
![]() |
faef966a4d | ||
![]() |
a054b5a06c | ||
![]() |
952a30ef34 | ||
![]() |
bada74e2a1 | ||
![]() |
ecd21b44a8 | ||
![]() |
edb6c98fd2 | ||
![]() |
b7b20cd9df | ||
![]() |
b91dfa04e3 | ||
![]() |
fe68599a34 | ||
![]() |
4ebd27002a | ||
![]() |
f3ffd6ad50 | ||
![]() |
0031e46191 | ||
![]() |
97ab3211e2 | ||
![]() |
8bc19c8dcf | ||
![]() |
6266c172b9 | ||
![]() |
ccd4da941c | ||
![]() |
834b555eca | ||
![]() |
d7ab738ca6 | ||
![]() |
f0db40ff11 | ||
![]() |
3363743bf7 | ||
![]() |
7bc7c34d4f | ||
![]() |
ee8627e078 | ||
![]() |
3dd6d53942 | ||
![]() |
2943d19ecd | ||
![]() |
48262bdce0 | ||
![]() |
b7dd415c97 | ||
![]() |
87f06e7297 | ||
![]() |
2f34252278 | ||
![]() |
8837b9d99e | ||
![]() |
1485098443 | ||
![]() |
303fa4ec33 | ||
![]() |
93c0362552 | ||
![]() |
ad91454574 | ||
![]() |
385de70e4d | ||
![]() |
26156e84e8 | ||
![]() |
f03fd95000 | ||
![]() |
9e0f68a652 | ||
![]() |
e0690096f8 | ||
![]() |
4d66df5091 | ||
![]() |
223b3d2be7 | ||
![]() |
bdd41715af | ||
![]() |
504bf11769 | ||
![]() |
de173e344e | ||
![]() |
31298be2b1 | ||
![]() |
9ee2991c3d | ||
![]() |
667e0962eb | ||
![]() |
d9453a93f3 | ||
![]() |
774bee6426 | ||
![]() |
defcfb4953 | ||
![]() |
b49f37dce9 | ||
![]() |
09813793be | ||
![]() |
39bd760faf | ||
![]() |
46cf8cc9b3 | ||
![]() |
daf08f40f2 | ||
![]() |
d8f090e559 | ||
![]() |
a034602651 | ||
![]() |
0cda2f43e2 | ||
![]() |
f7fcba329d | ||
![]() |
e10a602e7b | ||
![]() |
991686203c | ||
![]() |
911b2d0756 | ||
![]() |
4609d68ddc | ||
![]() |
2dea540afb | ||
![]() |
caa293a8f7 | ||
![]() |
7e87532ec2 | ||
![]() |
709bf386f4 | ||
![]() |
9b28dc8488 | ||
![]() |
2dc14d1cb3 | ||
![]() |
e653cc198e | ||
![]() |
599b21b9f4 | ||
![]() |
2b3473455c |
@@ -39,6 +39,7 @@
|
||||
* [Glossary](reference_glossary.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
* [Useful Functions](ref_functions.md)
|
||||
* [Configurator Support](reference_configurator_support.md)
|
||||
|
||||
* [Features](features.md)
|
||||
* [Basic Keycodes](keycodes_basic.md)
|
||||
|
@@ -39,6 +39,7 @@
|
||||
* [Glossary](reference_glossary.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
* [Useful Functions](ref_functions.md)
|
||||
* [Configurator Support](reference_configurator_support.md)
|
||||
|
||||
* [Features](features.md)
|
||||
* [Basic Keycodes](keycodes_basic.md)
|
||||
|
@@ -261,3 +261,32 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Forces the keyboard to wait for a USB connection to be established before it starts up
|
||||
* `NO_USB_STARTUP_CHECK`
|
||||
* Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.
|
||||
|
||||
## USB Endpoint Limitations
|
||||
|
||||
In order to provide services over USB, QMK has to use USB endpoints.
|
||||
These are a finite resource: each microcontroller has only a certain number.
|
||||
This limits what features can be enabled together.
|
||||
If the available endpoints are exceeded, a build error is thrown.
|
||||
|
||||
The following features can require separate endpoints:
|
||||
|
||||
* `MOUSEKEY_ENABLE`
|
||||
* `EXTRAKEY_ENABLE`
|
||||
* `CONSOLE_ENABLE`
|
||||
* `NKRO_ENABLE`
|
||||
* `MIDI_ENABLE`
|
||||
* `RAW_ENABLE`
|
||||
* `VIRTSER_ENABLE`
|
||||
|
||||
In order to improve utilisation of the endpoints, the HID features can be combined to use a single endpoint.
|
||||
By default, `MOUSEKEY`, `EXTRAKEY`, and `NKRO` are combined into a single endpoint.
|
||||
|
||||
The base keyboard functionality can also be combined into the endpoint,
|
||||
by setting `KEYBOARD_SHARED_EP = yes`.
|
||||
This frees up one more endpoint,
|
||||
but it can prevent the keyboard working in some BIOSes,
|
||||
as they do not implement Boot Keyboard protocol switching.
|
||||
|
||||
Combining the mouse also breaks Boot Mouse compatibility.
|
||||
The mouse can be uncombined by setting `MOUSE_SHARED_EP = no` if this functionality is required.
|
||||
|
@@ -11,8 +11,8 @@ Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_f
|
||||
|
||||
There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here:
|
||||
|
||||
<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/070a530eedaed36a2d77f3f6fd455677 -->
|
||||

|
||||
<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/bf431647d1001cff5eff20ae55621e9a -->
|
||||

|
||||
|
||||
## Some Of My Keys Are Swapped Or Not Working
|
||||
|
||||
|
@@ -54,14 +54,17 @@ In this handler, the value of an incrementing counter is mapped onto a precomput
|
||||
|
||||
## Backlight Functions
|
||||
|
||||
|Function |Description |
|
||||
|----------|----------------------------------------------------------|
|
||||
|`backlight_toggle()` |Turn the backlight on or off |
|
||||
|`backlight_step()` |Cycle through backlight levels |
|
||||
|`backlight_increase()` |Increase the backlight level |
|
||||
|`backlight_decrease()` |Decrease the backlight level |
|
||||
|`backlight_level(x)` |Sets the backlight level to specified level |
|
||||
|`get_backlight_level()`|Return the current backlight level |
|
||||
|Function |Description |
|
||||
|----------|-----------------------------------------------------------|
|
||||
|`backlight_toggle()` |Turn the backlight on or off |
|
||||
|`backlight_enable()` |Turn the backlight on |
|
||||
|`backlight_disable()` |Turn the backlight off |
|
||||
|`backlight_step()` |Cycle through backlight levels |
|
||||
|`backlight_increase()` |Increase the backlight level |
|
||||
|`backlight_decrease()` |Decrease the backlight level |
|
||||
|`backlight_level(x)` |Sets the backlight level to specified level |
|
||||
|`get_backlight_level()` |Return the current backlight level |
|
||||
|`is_backlight_enabled()`|Return whether the backlight is currently on |
|
||||
|
||||
### Backlight Breathing Functions
|
||||
|
||||
|
@@ -150,6 +150,30 @@ These are the effects that are currently available:
|
||||
#endif
|
||||
RGB_MATRIX_EFFECT_MAX
|
||||
};
|
||||
|
||||
You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`:
|
||||
|
||||
|
||||
|Define |Description |
|
||||
|---------------------------------------------------|--------------------------------------------|
|
||||
|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` |
|
||||
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|
||||
|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|
|
||||
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|
||||
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
||||
|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` |
|
||||
|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` |
|
||||
|
||||
|
||||
## Custom layer effects
|
||||
|
||||
|
@@ -8,7 +8,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state.
|
||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
||||
* [Combos](feature_combos.md) - Custom actions for multiple key holds.
|
||||
* [Combos](feature_combo.md) - Custom actions for multiple key holds.
|
||||
* [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic").
|
||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||
* [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave.
|
||||
|
@@ -8,7 +8,6 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta
|
||||
|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. |
|
||||
|`uint8_t i2c_start(uint8_t address);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. |
|
||||
|`uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. |
|
||||
|`uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. |
|
||||
|`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. |
|
||||
|`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. |
|
||||
|
@@ -141,9 +141,9 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
|
||||
|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` |
|
||||
|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards |
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and <code>|</code> |
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and `_` |
|
||||
|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |
|
||||
|`KC_INT3` |`KC_JYEN` |JIS `¥` |
|
||||
|`KC_INT3` |`KC_JYEN` |JIS `¥` and <code>|</code> |
|
||||
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|
||||
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|
||||
|`KC_INT6` | |JIS Numpad `,` |
|
||||
@@ -206,18 +206,19 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------|-----------|---------------------------------------------------------------------|
|
||||
|`RESET` | |Put the keyboard into DFU mode for flashing |
|
||||
|`DEBUG` | |Toggle debug mode |
|
||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||
|`M(n)` | |Call macro `n` |
|
||||
|`MACROTAP(n)`| |Macro-tap `n` idk FIXME |
|
||||
|Key |Aliases |Description |
|
||||
|---------------|-----------|---------------------------------------------------------------------|
|
||||
|`RESET` | |Put the keyboard into DFU mode for flashing |
|
||||
|`DEBUG` | |Toggle debug mode |
|
||||
|`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it |
|
||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||
|`M(n)` | |Call macro `n` |
|
||||
|`MACROTAP(n)` | |Macro-tap `n` idk FIXME |
|
||||
|
||||
## [Audio Keys](feature_audio.md)
|
||||
|
||||
@@ -459,6 +460,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`SH_MOFF` |Momentarily turns off swap. |
|
||||
|`SH_TG` |Toggles swap on and off with every key press. |
|
||||
|`SH_TT` |Toggles with a tap; momentary when held. |
|
||||
|
||||
## [Unicode Support](feature_unicode.md)
|
||||
|
||||
|Key |Aliases| |
|
||||
|
@@ -123,9 +123,9 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|---------|-------------------------------|
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and <code>|</code>|
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and `_` |
|
||||
|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana |
|
||||
|`KC_INT3` |`KC_JYEN`|JIS `¥` |
|
||||
|`KC_INT3` |`KC_JYEN`|JIS `¥` and <code>|</code>|
|
||||
|`KC_INT4` |`KC_HENK`|JIS Henkan |
|
||||
|`KC_INT5` |`KC_MHEN`|JIS Muhenkan |
|
||||
|`KC_INT6` | |JIS Numpad `,` |
|
||||
|
@@ -28,6 +28,6 @@ Sometimes it's useful to print debug messages from within your [custom code](cus
|
||||
After that you can use a few different print functions:
|
||||
|
||||
* `print("string")`: Print a simple string.
|
||||
* `sprintf("%s string", var)`: Print a formatted string
|
||||
* `uprintf("%s string", var)`: Print a formatted string
|
||||
* `dprint("string")` Print a simple string, but only when debug mode is enabled
|
||||
* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
|
||||
|
195
docs/reference_configurator_support.md
Normal file
195
docs/reference_configurator_support.md
Normal file
@@ -0,0 +1,195 @@
|
||||
# Supporting Your Keyboard in QMK Configurator
|
||||
|
||||
This page covers how to properly support keyboards in the [QMK Configurator](https://config.qmk.fm/).
|
||||
|
||||
|
||||
## How the Configurator Understands Keyboards
|
||||
|
||||
To understand how the Configurator understands keyboards, first one must understand layout macros. For this exercise, we're going to imagine a 17-key numpad PCB, which we're going to call `numpad`.
|
||||
|
||||
```
|
||||
┌───┬───┬───┬───┐
|
||||
│NLk│ / │ * │ - │
|
||||
├───┼───┼───┼───┤
|
||||
│7 │8 │9 │ + │
|
||||
├───┼───┼───┤ │
|
||||
│4 │5 │6 │ │
|
||||
├───┼───┼───┼───┤
|
||||
│1 │2 │3 │Ent│
|
||||
├───┴───┼───┤ │
|
||||
│0 │ . │ │
|
||||
└───────┴───┴───┘
|
||||
```
|
||||
|
||||
?> For more on layout macros, see [Understanding QMK: Matrix Scanning](understanding_qmk.md?id=matrix-scanning) and [Understanding QMK: Matrix to Physical Layout Map](understanding_qmk.md?id=matrix-to-physical-layout-map).
|
||||
|
||||
The Configurator's API reads the keyboard's `.h` file from `qmk_firmware/keyboards/<keyboard>/<keyboard>.h`. For our numpad, this file would be `qmk_firmware/keyboards/numpad/numpad.h`:
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32, k33, \
|
||||
k40, k42 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03 }, \
|
||||
{ k10, k11, k12, k13 }, \
|
||||
{ k20, k21, k22, KC_NO }, \
|
||||
{ k30, k31, k32, k33 }, \
|
||||
{ k40, KC_NO, k42, KC_NO } \
|
||||
}
|
||||
```
|
||||
|
||||
QMK uses `KC_NO` to designate places in the switch matrix where there is no switch. Sometimes, `XXX`, `___` or `____` are used as shorthand to make this section easier to read if it needs to be debugged. This is usually defined near the beginning of the `.h` file:
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#define XXX KC_NO
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32, k33, \
|
||||
k40, k42 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03 }, \
|
||||
{ k10, k11, k12, k13 }, \
|
||||
{ k20, k21, k22, XXX }, \
|
||||
{ k30, k31, k32, k33 }, \
|
||||
{ k40, XXX, k42, XXX } \
|
||||
}
|
||||
```
|
||||
|
||||
!> This usage differs from that of keymap macros, which almost always use `XXXXXXX` (seven capital X's) for `KC_NO` and `_______` (seven underscores) for `KC_TRNS`.
|
||||
|
||||
!> To prevent user confusion, using `KC_NO` is preferred.
|
||||
|
||||
The layout macro tells the Configurator that our keyboard has 17 keys, arranged in five rows of four columns each. Our switch positions are named `k<row><column>`, counting from 0. The names themselves actually don't matter, as long as they match between the top section, which receives the keycodes from the keymap, and the bottom half which designates where each key is in the matrix.
|
||||
|
||||
To display our keyboard in a way that resembles the physical keyboard, we need to build a JSON file that tells the Configurator how to tie the physical locations and sizes of our keys to our switch matrix.
|
||||
|
||||
## Building the JSON file
|
||||
|
||||
To build the JSON file, the easiest way is to build the layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/) ("KLE"), from which we'll feed the Raw Data into a QMK tool that converts this data into a JSON the Configurator will read and use. Since KLE opens by default with a numpad layout, we're just going to remove the Getting Started instructions, and use what's left.
|
||||
|
||||
Once the layout is as desired, move to the Raw Data tab in KLE, and copy the contents:
|
||||
|
||||
```
|
||||
["Num Lock","/","*","-"],
|
||||
["7\nHome","8\n↑","9\nPgUp",{h:2},"+"],
|
||||
["4\n←","5","6\n→"],
|
||||
["1\nEnd","2\n↓","3\nPgDn",{h:2},"Enter"],
|
||||
[{w:2},"0\nIns",".\nDel"]
|
||||
```
|
||||
|
||||
To convert this data into our JSON, go to the [QMK KLE-JSON Converter](https://qmk.fm/converter/), paste the Raw Data into the Input field, and click the Convert button. After a moment, our JSON data will appear in the Output field. Copy the contents to a new text document, and name the document `info.json`, saving it in the same folder that contains `numpad.h`.
|
||||
|
||||
Use the `keyboard_name` object to set the name of the keyboard. The `bootloader` object is deprecated, so it can be deleted. For instruction purposes, we will put each key's object on its own line. This is only to make the file more human-readable, and does not affect the Configurator's functionality.
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard_name": "Numpad",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"tags": {
|
||||
"form_factor": "numpad"
|
||||
},
|
||||
"width": 4,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Num Lock", "x":0, "y":0},
|
||||
{"label":"/", "x":1, "y":0},
|
||||
{"label":"*", "x":2, "y":0},
|
||||
{"label":"-", "x":3, "y":0},
|
||||
{"label":"7", "x":0, "y":1},
|
||||
{"label":"8", "x":1, "y":1},
|
||||
{"label":"9", "x":2, "y":1},
|
||||
{"label":"+", "x":3, "y":1, "h":2},
|
||||
{"label":"4", "x":0, "y":2},
|
||||
{"label":"5", "x":1, "y":2},
|
||||
{"label":"6", "x":2, "y":2},
|
||||
{"label":"1", "x":0, "y":3},
|
||||
{"label":"2", "x":1, "y":3},
|
||||
{"label":"3", "x":2, "y":3},
|
||||
{"label":"Enter", "x":3, "y":3, "h":2},
|
||||
{"label":"0", "x":0, "y":4, "w":2},
|
||||
{"label":".", "x":2, "y":4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `layouts` object contains the data that represents the physical layout of the keyboard. It has an object `LAYOUT`, which needs to match the name of our layout macro from `numpad.h`. The `LAYOUT` object itself has an object named `layout`, which contains one JSON object for each physical key on our keyboard, formatted as follows:
|
||||
|
||||
```
|
||||
┌ The name of the key. Not displayed in the Configurator.
|
||||
│ ┌ The key's X-axis location, in key units from the
|
||||
│ │ keyboard's left edge.
|
||||
│ │ ┌ The key's Y-axis location, in key units from
|
||||
│ │ │ the keyboard's top (rear-facing) edge.
|
||||
↓ ↓ ↓
|
||||
{"label":"Num Lock", "x":0, "y":0},
|
||||
```
|
||||
|
||||
Some objects will also have `"w"` and `"h"` keys, which represent a key's width and height, respectively.
|
||||
|
||||
?> For more on the `info.json` files, see [QMK Keyboard Guidelines: Keyboard Metadata](hardware_keyboard_guidelines.md?id=keyboard-metadata)
|
||||
|
||||
|
||||
## How the Configurator Programs Keys
|
||||
|
||||
The Configurator's API uses the layout macro and the JSON file we've given it to create a visual representation of the keyboard that has each visual object tied to a specific key, in sequence:
|
||||
|
||||
key in layout macro | JSON object used
|
||||
:---: | :----
|
||||
k00 | {"label":"Num Lock", "x":0, "y":0}
|
||||
k01 | {"label":"/", "x":1, "y":0}
|
||||
k02 | {"label":"*", "x":2, "y":0}
|
||||
k03 | {"label":"-", "x":3, "y":0}
|
||||
k10 | {"label":"7", "x":0, "y":1}
|
||||
k11 | {"label":"8", "x":1, "y":1}
|
||||
k12 | {"label":"9", "x":2, "y":1}
|
||||
k13 | {"label":"+", "x":3, "y":1, "h":2}
|
||||
k20 | {"label":"4", "x":0, "y":2}
|
||||
k21 | {"label":"5", "x":1, "y":2}
|
||||
k22 | {"label":"6", "x":2, "y":2}
|
||||
k30 | {"label":"1", "x":0, "y":3}
|
||||
k31 | {"label":"2", "x":1, "y":3}
|
||||
k32 | {"label":"3", "x":2, "y":3}
|
||||
k33 | {"label":"Enter", "x":3, "y":3, "h":2}
|
||||
k40 | {"label":"0", "x":0, "y":4, "w":2}
|
||||
k42 | {"label":".", "x":2, "y":4}
|
||||
|
||||
When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NLCK` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file.
|
||||
|
||||
|
||||
## Issues and Hazards
|
||||
|
||||
Currently, the Configurator does not support key rotation or non-rectangular key shapes like ISO Enter. Additionally, keys that are vertically-offset from their "row" — the arrow keys on 1800-layouts like the [TKC1800](https://github.com/qmk/qmk_firmware/tree/4ac48a61a66206beaf2fdd5f2939d8bbedd0004c/keyboards/tkc1800/) being a prominent example — confuse the KLE-to-JSON Converter, if not adjusted for by the contributor of the `info.json` file.
|
||||
|
||||
### Workarounds
|
||||
|
||||
#### Non-rectangular keys
|
||||
|
||||
For ISO Enter keys, QMK custom is to display it as a rectangular key, 1.25u wide and 2u high, aligned so its right edge is aligned with the right edge of the alphanumeric key block.
|
||||
|
||||

|
||||
*A 60% keyboard in standard ISO layout, as rendered by QMK Configurator.*
|
||||
|
||||
#### Vertically-offset keys
|
||||
|
||||
For vertically-offset keys, place them in KLE as if they were not offset, then edit the Y-values as needed in the converted JSON file
|
||||
|
||||

|
||||
*An 1800-layout keyboard as rendered in Keyboard Layout Editor, without the vertical offset applied to the arrow keys.*
|
||||
|
||||

|
||||
*A Unix diff file, showing the changes needed to vertically-offset the arrow keys in our keyboard's JSON file.*
|
@@ -56,3 +56,16 @@
|
||||
{ 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 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_kc_ortho_4x12( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b, ___, ___, ___, ___}, \
|
||||
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b, ___, ___, ___, ___}, \
|
||||
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b, ___, ___, ___, ___}, \
|
||||
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b, ___, ___, ___, ___} \
|
||||
}
|
||||
|
@@ -76,5 +76,4 @@ AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
|
||||
#FIXME: Community keymap build are currently failing due to missing functionality
|
||||
#LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16
|
||||
LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16
|
||||
|
@@ -77,5 +77,4 @@ AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
|
||||
#FIXME: Community keymap build are currently failing due to missing functionality
|
||||
#LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15
|
||||
LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15
|
||||
|
@@ -17,3 +17,5 @@
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
@@ -15,19 +15,62 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define FN1_Q LT(1, KC_Q)
|
||||
enum foobar_layers {
|
||||
QWERTY,
|
||||
FN1,
|
||||
FN2,
|
||||
FN3,
|
||||
FN4,
|
||||
FN5
|
||||
};
|
||||
|
||||
#define FN1_SPC LT(FN1, KC_SPC)
|
||||
#define FN2_BSC LT(FN2, KC_BSPC)
|
||||
#define FN3_C LT(FN3, KC_C)
|
||||
#define FN4_V LT(FN4, KC_V)
|
||||
#define FN5_B LT(FN5, KC_B)
|
||||
#define RALT_N RALT_T(KC_N)
|
||||
#define LALT_X LALT_T(KC_X)
|
||||
#define LCTL_Z LCTL_T(KC_Z)
|
||||
#define RCTL_M RCTL_T(KC_M)
|
||||
#define LSFT_ENT LSFT_T(KC_ENT)
|
||||
#define RGUI_ESC RGUI_T(KC_ESC)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_split(
|
||||
FN1_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESC,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT
|
||||
[QWERTY] = LAYOUT_split(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, RGUI_ESC,
|
||||
LCTL_Z, LALT_X, FN3_C, FN4_V, FN2_BSC, FN1_SPC, FN5_B, RALT_N, RCTL_M, LSFT_ENT
|
||||
),
|
||||
|
||||
[1] = LAYOUT_split(
|
||||
[FN1] = LAYOUT_split(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
_______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[FN2] = LAYOUT_split(
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
|
||||
KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_GRV,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[FN3] = LAYOUT_split(
|
||||
_______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_TAB, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_SCLN, KC_QUOT,
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
[FN4] = LAYOUT_split(
|
||||
_______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
KC_TAB, _______, _______, _______, _______, KC_LABK, KC_RABK, KC_QUES, KC_COLN, KC_DQUO,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[FN5] = LAYOUT_split(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, RESET, _______, _______, _______
|
||||
_______, _______, _______, _______, _______, RESET, _______, _______, _______, _______
|
||||
),
|
||||
};
|
||||
|
||||
|
12
keyboards/40percentclub/luddite/info.json
Normal file
12
keyboards/40percentclub/luddite/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "foobar",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_60_ansi": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
}
|
||||
}
|
||||
}
|
15
keyboards/40percentclub/mf68/keymaps/68keys/config.h
Normal file
15
keyboards/40percentclub/mf68/keymaps/68keys/config.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#undef VENDOR_ID
|
||||
#undef PRODUCT_ID
|
||||
#undef DEVICE_VER
|
||||
#undef MANUFACTURER
|
||||
#undef PRODUCT
|
||||
#undef DESCRIPTION
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0A0C
|
||||
#define DEVICE_VER 0x0068
|
||||
#define MANUFACTURER 68Keys.io
|
||||
#define PRODUCT The 68Keys.io Keyboard
|
||||
#define DESCRIPTION A 68 keys mechanical keyboard
|
11
keyboards/40percentclub/mf68/keymaps/68keys/keymap.c
Normal file
11
keyboards/40percentclub/mf68/keymaps/68keys/keymap.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_68_ansi(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_ESC, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
|
||||
KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
)
|
||||
};
|
@@ -2,22 +2,22 @@
|
||||
|
||||
Custom [68Keys.io](https://68keys.io) DIY keyboard.
|
||||
|
||||
Keyboard Maintainer: [sbstjn](https://sbstjn.com)
|
||||
Hardware Supported: Pro Micro
|
||||
Keymap Maintainer: [sbstjn](https://sbstjn.com)
|
||||
Hardware Supported: mf68
|
||||
Hardware Availability: [DIY Guide](https://68keys.io)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
```bash
|
||||
$ > cd qmk_firmware/
|
||||
$ > make 68keys:default
|
||||
$ > make 40percentclub/mf68:68keys
|
||||
```
|
||||
|
||||
Example of flashing this keyboard:
|
||||
|
||||
```bash
|
||||
$ > cd qmk_firmware/
|
||||
$ > make 68keys:default:avrdude
|
||||
$ > make 40percentclub/mf68:68keys:avrdude
|
||||
```
|
||||
|
||||
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).
|
5
keyboards/40percentclub/mf68/keymaps/68keys/rules.mk
Normal file
5
keyboards/40percentclub/mf68/keymaps/68keys/rules.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
29
keyboards/412_64/412_64.c
Normal file
29
keyboards/412_64/412_64.c
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
#include "412_64.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
29
keyboards/412_64/412_64.h
Normal file
29
keyboards/412_64/412_64.h
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
#ifndef FOURx16_H
|
||||
#define FOURx16_H
|
||||
|
||||
#include "quantum.h"
|
||||
#define ___ KC_NO
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
|
||||
#define LAYOUT_ortho_4x16( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \
|
||||
K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, \
|
||||
K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, \
|
||||
K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K02, K04, K06, K08, K10, K12, K14 }, \
|
||||
{ K01, K03, K05, K07, K09, K11, K13, K15 }, \
|
||||
{ K16, K18, K20, K22, K24, K26, K28, K30 }, \
|
||||
{ K17, K19, K21, K23, K25, K27, K29, K31 }, \
|
||||
{ K32, K34, K36, K38, K40, K42, K44, K46 }, \
|
||||
{ K33, K35, K37, K39, K41, K43, K45, K47 }, \
|
||||
{ K48, K50, K52, K54, K56, K58, K60, K62 }, \
|
||||
{ K49, K51, K53, K55, K57, K59, K61, K63 } \
|
||||
}
|
||||
|
||||
#endif
|
202
keyboards/412_64/config.h
Normal file
202
keyboards/412_64/config.h
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xF7E0
|
||||
#define PRODUCT_ID 0x0412
|
||||
#define DEVICE_VER 0x0000
|
||||
#define MANUFACTURER EDI/SCI
|
||||
#define PRODUCT 412 64 Model 00
|
||||
#define DESCRIPTION A compact 60% keyboard inspired by the 4x4x4x4x4
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 8
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D3, F4, F5, F6, F7, B1, B3, B2 }
|
||||
#define MATRIX_COL_PINS { B0, D2, D0, D1, D4, C6, D7, E6 }
|
||||
#define UNUSED_PINS { B4, B5, B6, B7, C7, F0, F1 }
|
||||
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
// #define BACKLIGHT_PIN C7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
5
keyboards/412_64/keymaps/default/config.h
Normal file
5
keyboards/412_64/keymaps/default/config.h
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
105
keyboards/412_64/keymaps/default/keymap.c
Normal file
105
keyboards/412_64/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,105 @@
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define _MAIN 0
|
||||
#define _RAISE 1
|
||||
#define _LOWER 2
|
||||
|
||||
// Readability keycodes
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
/* MAIN
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------------------------.
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | Backsp | Delete | 7 | 8 | 9 |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | ESC | A | S | D | F | G | H | J | K | L | ; | ' | PgUp | 4 | 5 | 6 |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | SHIFT | Z | X | C | V | B | N | M | , | . | / | ENTER | PgDn | 1 | 2 | 3 |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | LCTRL | PAUS | GUI | ALT | Lower | Space | Space | Raise | Left | Down | Up | Right | Shift | 0 | . | ENTER |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_MAIN] = LAYOUT_ortho_4x16(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_DEL, KC_KP_7, KC_KP_8, KC_KP_9,
|
||||
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_PGUP, KC_KP_4, KC_KP_5, KC_KP_6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_PGDN, KC_KP_1, KC_KP_2, KC_KP_3,
|
||||
KC_LCTL, KC_PAUS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RSFT, KC_KP_0, KC_KP_DOT, KC_PENT
|
||||
),
|
||||
|
||||
/* RAISE
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Insert | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | | | | | | | - | = | [ | ] | \ | Home | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | | | | | | | ISO # | ISO / | | | PScr | End | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play | | | | |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_RAISE] = LAYOUT_ortho_4x16(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_INS, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, _______, _______, KC_PSCR, KC_END, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* LOWER
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | | Reset |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | ISO ~ | ISO | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | | | | | | | | | | Mute | | | | |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_LOWER] = LAYOUT_ortho_4x16(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, RESET,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
keyevent_t event = record->event;
|
||||
(void)event;
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
1
keyboards/412_64/keymaps/default/rules.mk
Normal file
1
keyboards/412_64/keymaps/default/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
KEY_LOCK_ENABLE = yes # Enable the universal locking key, which lets you do any locking you require.
|
15
keyboards/412_64/readme.md
Normal file
15
keyboards/412_64/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 412-64
|
||||
|
||||

|
||||
|
||||
A compact 60% keyboard designed by Fate Everywhere and sold on a limited basis. Born out of the desire for a Planck with a numpad for technical work.
|
||||
|
||||
Keyboard Maintainer: [Fate Everywhere](https://github.com/fateeverywhere)
|
||||
Hardware Supported: 4x16 T&E Prototype, 412-64 Mk. 0, Mk. 1.
|
||||
Hardware Availability: Highly limited, contact /u/FateEverywhere on reddit for availability.
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 412-64: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/412_64/rules.mk
Normal file
73
keyboards/412_64/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
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
|
||||
LAYOUTS = ortho_4x16
|
@@ -1,6 +0,0 @@
|
||||
#include "68keys.h"
|
||||
|
||||
void matrix_init_kb(void)
|
||||
{
|
||||
matrix_init_user();
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT_68_ansi( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \
|
||||
K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
||||
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
|
||||
K64, K65, K66, K67, K68, K70, K71, K72, K73, K74) \
|
||||
{ \
|
||||
{K00, K01, K02, K03, K04, K05, K06, K07, K08}, \
|
||||
{K10, K11, K12, K13, K14, K15, K16, K17, K18}, \
|
||||
{K20, K21, K22, K23, K24, K25, K26, K27, K28}, \
|
||||
{K30, K31, K32, K33, K34, K35, K36, K37, K38}, \
|
||||
{K40, K41, K42, K43, K44, K45, K46, K47, K48}, \
|
||||
{K50, K51, K52, K53, K54, K55, K56, K57, K58}, \
|
||||
{K60, K61, K62, K63, K64, K65, K66, K67, K68}, \
|
||||
{ \
|
||||
K70, K71, K72, K73, K74 \
|
||||
} \
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0A0C
|
||||
#define DEVICE_VER 0x0068
|
||||
#define MANUFACTURER 68Keys.io
|
||||
#define PRODUCT The 68Keys.io Keyboard
|
||||
#define DESCRIPTION A 68 keys mechanical keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 9
|
||||
|
||||
#define MATRIX_ROW_PINS \
|
||||
{ \
|
||||
B6, B2, B3, B1, F7, F6, F5, F4 \
|
||||
}
|
||||
#define MATRIX_COL_PINS \
|
||||
{ \
|
||||
D3, D2, D1, D0, D4, C6, D7, E6, B4 \
|
||||
}
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN B5
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
@@ -1,81 +0,0 @@
|
||||
{
|
||||
"keyboard_name": "68Keys.io",
|
||||
"url": "https://68keys.io",
|
||||
"maintainer": "qmk",
|
||||
"width": 17.25,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_68_ansi": {
|
||||
"layout": [
|
||||
{ "label": "~", "x": 0, "y": 0 },
|
||||
{ "label": "!", "x": 1, "y": 0 },
|
||||
{ "label": "@", "x": 2, "y": 0 },
|
||||
{ "label": "#", "x": 3, "y": 0 },
|
||||
{ "label": "$", "x": 4, "y": 0 },
|
||||
{ "label": "%", "x": 5, "y": 0 },
|
||||
{ "label": "^", "x": 6, "y": 0 },
|
||||
{ "label": "&", "x": 7, "y": 0 },
|
||||
{ "label": "*", "x": 8, "y": 0 },
|
||||
{ "label": "(", "x": 9, "y": 0 },
|
||||
{ "label": ")", "x": 10, "y": 0 },
|
||||
{ "label": "_", "x": 11, "y": 0 },
|
||||
{ "label": "+", "x": 12, "y": 0 },
|
||||
{ "label": "Backspace", "x": 13, "y": 0, "w": 2 },
|
||||
{ "label": "ESC", "x": 15.25, "y": 0 },
|
||||
{ "label": "PGUP", "x": 16.25, "y": 0 },
|
||||
{ "label": "Tab", "x": 0, "y": 1, "w": 1.5 },
|
||||
{ "label": "Q", "x": 1.5, "y": 1 },
|
||||
{ "label": "W", "x": 2.5, "y": 1 },
|
||||
{ "label": "E", "x": 3.5, "y": 1 },
|
||||
{ "label": "R", "x": 4.5, "y": 1 },
|
||||
{ "label": "T", "x": 5.5, "y": 1 },
|
||||
{ "label": "Y", "x": 6.5, "y": 1 },
|
||||
{ "label": "U", "x": 7.5, "y": 1 },
|
||||
{ "label": "I", "x": 8.5, "y": 1 },
|
||||
{ "label": "O", "x": 9.5, "y": 1 },
|
||||
{ "label": "P", "x": 10.5, "y": 1 },
|
||||
{ "label": "{", "x": 11.5, "y": 1 },
|
||||
{ "label": "}", "x": 12.5, "y": 1 },
|
||||
{ "label": "|", "x": 13.5, "y": 1, "w": 1.5 },
|
||||
{ "label": "DEL", "x": 15.25, "y": 1 },
|
||||
{ "label": "PGDN", "x": 16.25, "y": 1 },
|
||||
{ "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 },
|
||||
{ "label": "A", "x": 1.75, "y": 2 },
|
||||
{ "label": "S", "x": 2.75, "y": 2 },
|
||||
{ "label": "D", "x": 3.75, "y": 2 },
|
||||
{ "label": "F", "x": 4.75, "y": 2 },
|
||||
{ "label": "G", "x": 5.75, "y": 2 },
|
||||
{ "label": "H", "x": 6.75, "y": 2 },
|
||||
{ "label": "J", "x": 7.75, "y": 2 },
|
||||
{ "label": "K", "x": 8.75, "y": 2 },
|
||||
{ "label": "L", "x": 9.75, "y": 2 },
|
||||
{ "label": ":", "x": 10.75, "y": 2 },
|
||||
{ "label": "\"", "x": 11.75, "y": 2 },
|
||||
{ "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 },
|
||||
{ "label": "Shift", "x": 0, "y": 3, "w": 2.25 },
|
||||
{ "label": "Z", "x": 2.25, "y": 3 },
|
||||
{ "label": "X", "x": 3.25, "y": 3 },
|
||||
{ "label": "C", "x": 4.25, "y": 3 },
|
||||
{ "label": "V", "x": 5.25, "y": 3 },
|
||||
{ "label": "B", "x": 6.25, "y": 3 },
|
||||
{ "label": "N", "x": 7.25, "y": 3 },
|
||||
{ "label": "M", "x": 8.25, "y": 3 },
|
||||
{ "label": "<", "x": 9.25, "y": 3 },
|
||||
{ "label": ">", "x": 10.25, "y": 3 },
|
||||
{ "label": "?", "x": 11.25, "y": 3 },
|
||||
{ "label": "Shift", "x": 12.25, "y": 3, "w": 2.75 },
|
||||
{ "x": 15.25, "y": 3 },
|
||||
{ "label": "CTRL", "x": 0, "y": 4, "w": 1.25 },
|
||||
{ "label": "ALT", "x": 1.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "GUI", "x": 2.5, "y": 4, "w": 1.25 },
|
||||
{ "x": 3.75, "y": 4, "w": 6.25 },
|
||||
{ "label": "GUI", "x": 10, "y": 4, "w": 1.25 },
|
||||
{ "label": "ALT", "x": 11.25, "y": 4, "w": 1.25 },
|
||||
{ "label": "CTRL", "x": 12.5, "y": 4, "w": 1.25 },
|
||||
{ "x": 14.25, "y": 4 },
|
||||
{ "x": 15.25, "y": 4 },
|
||||
{ "x": 16.25, "y": 4 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "68keys.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_68_ansi(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_ESC, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
|
||||
KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT)};
|
@@ -1,22 +0,0 @@
|
||||
LAYOUTS = 68_ansi
|
||||
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
F_USB = $(F_CPU)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration (+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys (+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control (+450)
|
||||
CONSOLE_ENABLE = no # Console for debug (+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
|
@@ -17,6 +17,9 @@ void matrix_scan_kb(void) {
|
||||
void led_init_ports(void) {
|
||||
// * Set our LED pins as output
|
||||
DDRB &= ~(1<<5);
|
||||
|
||||
//Set output high, so the capslock led is off
|
||||
PORTB |= (1 << 5);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
@@ -17,6 +17,9 @@ void matrix_scan_kb(void) {
|
||||
void led_init_ports(void) {
|
||||
// * Set our LED pins as output
|
||||
DDRE |= (1 << 6);
|
||||
|
||||
//Set output high, so the capslock led is off
|
||||
PORTE |= (1 << 6);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
@@ -1,5 +1,3 @@
|
||||
SRC += ws2812.c
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
MCU = atmega32u4
|
||||
@@ -54,7 +52,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
|
54
keyboards/bpiphany/pegasushoof/keymaps/default_jis/keymap.c
Normal file
54
keyboards/bpiphany/pegasushoof/keymaps/default_jis/keymap.c
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Copyright 2016 Daniel Svensson <dsvensson@gmail.com>
|
||||
2018 Charlie McMackin <charliemac@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
|
||||
|
||||
#define KM_JIS 0
|
||||
#define KM_MEDIA 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] =
|
||||
{
|
||||
/* Layer 0: Standard JIS layer */
|
||||
[KM_JIS] = LAYOUT_tkl_jis(KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, KC_DEL, KC_END, KC_PGDN, \
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_BSLS,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_RO, KC_RSFT, KC_UP, \
|
||||
KC_LCTL, KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_HENK,KC_KANA,KC_RALT,MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT),
|
||||
/* Layer 1: Function layer */
|
||||
[KM_MEDIA] = LAYOUT_tkl_jis(_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLU, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLD, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_MPLY, \
|
||||
_______,_______,_______,_______, _______, _______,_______,_______,_______,RESET , KC_MPRV,KC_MSTP,KC_MNXT)
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
ph_caps_led_on();
|
||||
} else {
|
||||
ph_caps_led_off();
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
ph_sclk_led_on();
|
||||
} else {
|
||||
ph_sclk_led_off();
|
||||
}
|
||||
}
|
17
keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk
Normal file
17
keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX = yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
@@ -41,6 +41,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* 7 */ { ___ , ___ , ___ , ___ , ___ , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , ___ , KP7 , ___ , ___ }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_tkl_jis( \
|
||||
KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \
|
||||
KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO7, KO2, KR4, KC4, KE4, \
|
||||
KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \
|
||||
KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \
|
||||
KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KL0, KB3, KC6, \
|
||||
KP4, KD2, KN6, KG0, KQ6, KH0, KI0, KN0, KM0, KP1, KC0, KQ0, KR0 \
|
||||
) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
|
||||
/* 0 */ { ___ , ___ , KC0 , ___ , ___ , KF0 , KG0 , KH0 , KI0 , KJ0 , KK0 , KL0 , KM0 , KN0 , KO0 , ___ , KQ0 , KR0 }, \
|
||||
/* 1 */ { ___ , ___ , ___ , ___ , ___ , ___ , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , ___ , KO1 , KP1 , ___ , ___ }, \
|
||||
/* 2 */ { ___ , KB2 , ___ , KD2 , ___ , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , ___ , KO2 , ___ , ___ , ___ }, \
|
||||
/* 3 */ { ___ , KB3 , ___ , ___ , ___ , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , ___ , KO3 , ___ , ___ , ___ }, \
|
||||
/* 4 */ { ___ , ___ , KC4 , ___ , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , ___ , KO4 , KP4 , KQ4 , KR4 }, \
|
||||
/* 5 */ { ___ , ___ , KC5 , ___ , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , ___ , ___ }, \
|
||||
/* 6 */ { ___ , ___ , KC6 , ___ , ___ , KF6 , KG6 , ___ , KI6 , KJ6 , KK6 , KL6 , ___ , KN6 , KO6 , ___ , KQ6 , ___ }, \
|
||||
/* 7 */ { ___ , ___ , ___ , ___ , ___ , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , KO7 , KP7 , ___ , ___ }, \
|
||||
}
|
||||
|
||||
inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); }
|
||||
inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); }
|
||||
|
||||
|
42
keyboards/converter/ibm_5291/config.h
Normal file
42
keyboards/converter/ibm_5291/config.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2018 listofoptions <listofoptions@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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 1
|
||||
#define MANUFACTURER QMK
|
||||
#define PRODUCT 5291 keyboard converter
|
||||
#define DESCRIPTION 5291 keyboard converter
|
||||
|
||||
#define MATRIX_ROWS 24
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
#define MATRIX_ROW_PINS {B2, B3, B4, B5, B6}
|
||||
#define MATRIX_COL_PINS {B0, B1}
|
||||
#define MATRIX_DATA_PIN D0
|
||||
#define MATRIX_STROBE_PIN D1
|
||||
#define LED_PIN D6
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 0
|
||||
|
||||
|
3
keyboards/converter/ibm_5291/ibm_5291.c
Normal file
3
keyboards/converter/ibm_5291/ibm_5291.c
Normal file
@@ -0,0 +1,3 @@
|
||||
#include "ibm_5291.h"
|
||||
#include <avr/io.h>
|
||||
#include "quantum.h"
|
69
keyboards/converter/ibm_5291/ibm_5291.h
Normal file
69
keyboards/converter/ibm_5291/ibm_5291.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
Copyright 2018 listofoptions <listofoptions@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
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/*
|
||||
* ,-------. ,--------------------------------------------------------------------------.
|
||||
* | F1| F2| |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS |NumLck |ScrLck |
|
||||
* |-------| |--------------------------------------------------------------------------|
|
||||
* | F3| F4| | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ] | | 7| 8| 9| -|
|
||||
* |-------| |------------------------------------------------------|Ent|---------------|
|
||||
* | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| |
|
||||
* |-------| |----------------------------------------------------------------------| |
|
||||
* | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +|
|
||||
* |-------| |----------------------------------------------------------------------| |
|
||||
* | F9|F10| | Alt | Space |CapsLck| 0 | . | |
|
||||
* `-------' `--------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
#define LAYOUT_5291( \
|
||||
KEY_F1,KEY_F2, KEY_ESC, KEY_1, KEY_2,KEY_3,KEY_4,KEY_5,KEY_6,KEY_7,KEY_8,KEY_9, KEY_0, KEY_MIN, KEY_EQU, KEY_BACK, KEY_NLOCK, KEY_SLOCK, \
|
||||
KEY_F3,KEY_F4, KEY_TAB, KEY_Q, KEY_W,KEY_E,KEY_R,KEY_T,KEY_Y,KEY_U,KEY_I,KEY_O, KEY_P, KEY_LBRC,KEY_RBRC, KEY_PAD7,KEY_PAD8, KEY_PAD9,KEY_PMIN, \
|
||||
KEY_F5,KEY_F6, KEY_LCTR,KEY_A, KEY_S,KEY_D,KEY_F,KEY_G,KEY_H,KEY_J,KEY_K,KEY_L, KEY_SEMI,KEY_QUOT,KEY_TICK, KEY_ENTR,KEY_PAD4,KEY_PAD5, KEY_PAD6, \
|
||||
KEY_F7,KEY_F8, KEY_LSFS,KEY_BSLS,KEY_Z,KEY_X,KEY_C,KEY_V,KEY_B,KEY_N,KEY_M,KEY_COMM,KEY_DOT, KEY_SLS,KEY_RSFS, KEY_PAST,KEY_PAD1,KEY_PAD2, KEY_PAD3,KEY_PPLS, \
|
||||
KEY_F9,KEY_F10, KEY_LALT, KEY_SPACE, KEY_CLOCK, KEY_PAD0, KEY_PDOT \
|
||||
) \
|
||||
{ {KEY_Z, KEY_S, KEY_W, KEY_3 }\
|
||||
, {KEY_X, KEY_D, KEY_E, KEY_4 }\
|
||||
, {KEY_C, KEY_F, KEY_R, KEY_5 }\
|
||||
, {KEY_V, KEY_G, KEY_T, KEY_6 }\
|
||||
, {KEY_B, KEY_H, KEY_Y, KEY_7 }\
|
||||
, {KEY_N, KEY_J, KEY_U, KEY_8 }\
|
||||
, {KEY_PAD2, KEY_PAD5,KEY_PAD8,KEY_NLOCK }\
|
||||
, {KEY_M, KEY_K, KEY_I, KEY_9 }\
|
||||
, {KEY_COMM, KEY_L, KEY_O, KEY_0 }\
|
||||
, {KEY_DOT, KEY_SEMI,KEY_P, KEY_MIN }\
|
||||
, {KEY_SLS, KEY_QUOT,KEY_LBRC,KEY_EQU }\
|
||||
, {KEY_SPACE, KEY_RSFS,KEY_TICK,KEY_RBRC }\
|
||||
, {KEY_CLOCK, KEY_PAST,KEY_ENTR,KEY_BACK }\
|
||||
, {KEY_PAD0, KEY_PAD1,KEY_PAD4,KEY_PAD7 }\
|
||||
, {KEY_PPLS, KC_NO, KEY_PMIN,KEY_SLOCK }\
|
||||
, {KEY_PDOT, KEY_PAD3,KEY_PAD6,KEY_PAD9 }\
|
||||
, {KEY_BSLS, KEY_A, KEY_Q, KEY_2 }\
|
||||
, {KEY_LALT, KC_NO, KC_NO, KEY_1 }\
|
||||
, {KEY_F7, KEY_F5, KEY_F3, KEY_F1 }\
|
||||
, {KEY_F8, KEY_F6, KEY_F4, KEY_F2 }\
|
||||
, {KC_F10, KC_NO, KC_NO, KC_NO }\
|
||||
, {KC_F9, KC_NO, KC_NO, KC_NO }\
|
||||
, {KEY_LSFS, KEY_LCTR,KEY_TAB, KEY_ESC }\
|
||||
, {KC_NO, KC_NO, KC_NO, KC_NO }\
|
||||
}
|
||||
|
||||
#define LAYOUT LAYOUT_5291
|
6
keyboards/converter/ibm_5291/info.json
Normal file
6
keyboards/converter/ibm_5291/info.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"keyboard_name": "IBM 5291",
|
||||
"keyboard_folder": "converter/5291",
|
||||
"url": "https://deskthority.net/wiki/IBM_Model_F#IBM_5291_Keyboard",
|
||||
"maintainer": "listofoptions",
|
||||
}
|
233
keyboards/converter/ibm_5291/keymaps/default/keymap.c
Normal file
233
keyboards/converter/ibm_5291/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
Copyright 2018 listofoptions <listofoptions@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
|
||||
/*
|
||||
enum xt_keycodes
|
||||
{ XT_PAST = SAFE_RANGE // XT pad asterisk / print screen
|
||||
, XT_SLCK // XT scroll lock / break
|
||||
, XT_F6 // F6 / app key
|
||||
, XT_F5 // F5 / gui
|
||||
, XT_F9 // F9 / F11
|
||||
, XT_F10 // F10 / F12
|
||||
} ;
|
||||
|
||||
static bool shift_pressed = false ,
|
||||
alt_pressed = false ,
|
||||
ctrl_pressed = false ,
|
||||
xt_pscr_pressed = false ,
|
||||
xt_brk_pressed = false ,
|
||||
xt_app_pressed = false ,
|
||||
xt_gui_pressed = false ,
|
||||
xt_lout_pressed = false ,
|
||||
xt_f11_pressed = false ,
|
||||
xt_f12_pressed = false ;
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_LSFT:
|
||||
case KC_RSFT:
|
||||
if (record->event.pressed) {
|
||||
shift_pressed = true ;
|
||||
} else {
|
||||
shift_pressed = false ;
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
||||
case KC_LALT:
|
||||
if (record->event.pressed) {
|
||||
alt_pressed = true ;
|
||||
} else {
|
||||
alt_pressed = false ;
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
||||
case KC_LCTL:
|
||||
if (record->event.pressed) {
|
||||
ctrl_pressed = true ;
|
||||
} else {
|
||||
ctrl_pressed = false ;
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
||||
case XT_PAST:
|
||||
if (record->event.pressed) {
|
||||
if (shift_pressed) {
|
||||
xt_pscr_pressed = true ;
|
||||
register_code(KC_PSCR);
|
||||
} else {
|
||||
register_code(KC_PAST);
|
||||
}
|
||||
} else {
|
||||
if (xt_pscr_pressed) {
|
||||
xt_pscr_pressed = false ;
|
||||
unregister_code(KC_PSCR);
|
||||
} else {
|
||||
unregister_code(KC_PAST);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case XT_SLCK:
|
||||
if (record->event.pressed) {
|
||||
if (ctrl_pressed) {
|
||||
xt_brk_pressed = true ;
|
||||
register_code(KC_BRK);
|
||||
} else {
|
||||
register_code(KC_SLCK);
|
||||
}
|
||||
} else {
|
||||
if (xt_brk_pressed) {
|
||||
xt_brk_pressed = false ;
|
||||
unregister_code(KC_BRK);
|
||||
} else {
|
||||
unregister_code(KC_SLCK);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case XT_F6:
|
||||
if (record->event.pressed) {
|
||||
if (shift_pressed) {
|
||||
xt_app_pressed = true ;
|
||||
register_code(KC_APP);
|
||||
} else {
|
||||
register_code(KC_F6);
|
||||
}
|
||||
} else {
|
||||
if (xt_app_pressed) {
|
||||
xt_app_pressed = false ;
|
||||
unregister_code(KC_APP);
|
||||
} else {
|
||||
unregister_code(KC_F6);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case XT_F5:
|
||||
if (record->event.pressed) {
|
||||
if (shift_pressed) {
|
||||
xt_gui_pressed = true ;
|
||||
register_code(KC_LGUI);
|
||||
} else if (ctrl_pressed) {
|
||||
xt_lout_pressed = true ;
|
||||
register_code (KC_LGUI) ;
|
||||
register_code (KC_L) ;
|
||||
} else {
|
||||
register_code(KC_F5);
|
||||
}
|
||||
} else {
|
||||
if (xt_gui_pressed) {
|
||||
xt_gui_pressed = false ;
|
||||
unregister_code(KC_LGUI);
|
||||
} else if (xt_lout_pressed) {
|
||||
xt_lout_pressed = false ;
|
||||
unregister_code (KC_LGUI) ;
|
||||
unregister_code (KC_L) ;
|
||||
} else {
|
||||
unregister_code(KC_F5);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case XT_F9:
|
||||
if (record->event.pressed) {
|
||||
if (shift_pressed) {
|
||||
xt_f11_pressed = true ;
|
||||
register_code(KC_F11);
|
||||
} else {
|
||||
register_code(KC_F9);
|
||||
}
|
||||
} else {
|
||||
if (xt_f11_pressed) {
|
||||
xt_f11_pressed = false ;
|
||||
unregister_code(KC_F11);
|
||||
} else {
|
||||
unregister_code(KC_F9);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case XT_F10:
|
||||
if (record->event.pressed) {
|
||||
if (shift_pressed) {
|
||||
xt_f12_pressed = true ;
|
||||
register_code(KC_F12);
|
||||
} else {
|
||||
register_code(KC_F10);
|
||||
}
|
||||
} else {
|
||||
if (xt_f12_pressed) {
|
||||
xt_f12_pressed = false ;
|
||||
unregister_code(KC_F12);
|
||||
} else {
|
||||
unregister_code(KC_F10);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
default:
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// default layout is the standard XT layout
|
||||
/*
|
||||
* ,-------. ,--------------------------------------------------------------------------.
|
||||
* | F1| F2| |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS |NumLck |ScrLck |
|
||||
* |-------| |--------------------------------------------------------------------------|
|
||||
* | F3| F4| | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ] | | 7| 8| 9| -|
|
||||
* |-------| |------------------------------------------------------|Ent|---------------|
|
||||
* | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| |
|
||||
* |-------| |----------------------------------------------------------------------| |
|
||||
* | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift| *| 1| 2| 3| +|
|
||||
* |-------| |----------------------------------------------------------------------| |
|
||||
* | F9|F10| | Alt | Space |CapsLck| 0 | . | |
|
||||
* `-------' `--------------------------------------------------------------------------'
|
||||
*/
|
||||
/*
|
||||
[0] = LAYOUT (
|
||||
KC_F1,KC_F2, 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_NLCK, XT_SLCK,
|
||||
KC_F3,KC_F4, 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_P7,KC_P8, KC_P9, KC_PMNS,
|
||||
XT_F5,XT_F6, 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_GRV, KC_ENT, KC_P4,KC_P5, KC_P6,
|
||||
KC_F7,KC_F8, KC_LSFT,KC_BSLS,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,XT_PAST,KC_P1,KC_P2, KC_P3, KC_PPLS,
|
||||
XT_F9,XT_F10,KC_LALT, KC_SPACE, KC_CAPS, KC_P0, KC_PDOT
|
||||
)
|
||||
*/
|
||||
[0] = LAYOUT (
|
||||
KC_F1,KC_F2, 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_NLCK, KC_SLCK,
|
||||
KC_F3,KC_F4, 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_P7,KC_P8, KC_P9, KC_PMNS,
|
||||
KC_F5,KC_F6, 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_GRV, KC_ENT, KC_P4,KC_P5, KC_P6,
|
||||
KC_F7,KC_F8, KC_LSFT,KC_BSLS,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PAST,KC_P1,KC_P2, KC_P3, KC_PPLS,
|
||||
KC_F9,KC_F10,KC_LALT, KC_SPACE, KC_CAPS, KC_P0, KC_PDOT
|
||||
)
|
||||
} ;
|
||||
|
Binary file not shown.
284
keyboards/converter/ibm_5291/matrix.c
Normal file
284
keyboards/converter/ibm_5291/matrix.c
Normal file
@@ -0,0 +1,284 @@
|
||||
/*
|
||||
Copyright 2018 listofoptions <listofoptions@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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#if defined(__AVR__)
|
||||
#include <avr/io.h>
|
||||
#endif
|
||||
#include <util/delay.h>
|
||||
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "timer.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#ifndef DEBOUNCING_DELAY
|
||||
# define DEBOUNCING_DELAY 5
|
||||
#endif
|
||||
|
||||
#define print_matrix_header() print("\nr/c 01234567\n")
|
||||
#define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
#define matrix_bitpop(i) bitpop(matrix[i])
|
||||
#define ROW_SHIFTER ((uint8_t)1)
|
||||
#define check_bit(var,pos) ((var) & (1<<(pos)))
|
||||
|
||||
#define NUM_ROW_PINS 5
|
||||
#define NUM_COL_PINS 2
|
||||
|
||||
static const uint8_t row_pins [NUM_ROW_PINS] = MATRIX_ROW_PINS ;
|
||||
static const uint8_t col_pins [NUM_ROW_PINS] = MATRIX_COL_PINS ;
|
||||
|
||||
#if ( DEBOUNCING_DELAY > 0 )
|
||||
static uint16_t debouncing_time ;
|
||||
static bool debouncing = false ;
|
||||
#endif
|
||||
|
||||
static uint8_t matrix [MATRIX_ROWS] = {0};
|
||||
|
||||
#if ( DEBOUNCING_DELAY > 0 )
|
||||
static uint8_t matrix_debounce [MATRIX_ROWS] = {0};
|
||||
#endif
|
||||
|
||||
static
|
||||
inline
|
||||
void toggle_led(void) {
|
||||
uint8_t pin = LED_PIN ;
|
||||
_SFR_IO8((pin >> 4) + 2) ^= _BV(pin & 0xF);
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
void init_led(void) {
|
||||
uint8_t pin = LED_PIN ;
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
void init_data(void) {
|
||||
uint8_t pin = MATRIX_DATA_PIN ;
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // LO
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
void init_strobe(void) {
|
||||
uint8_t pin = MATRIX_STROBE_PIN ;
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
void init_rows(void) {
|
||||
for ( uint8_t i = 0 ; i < NUM_ROW_PINS; ++i ) {
|
||||
uint8_t pin = row_pins[i];
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
void init_cols(void) {
|
||||
for ( uint8_t i = 0 ; i < NUM_COL_PINS; ++i ) {
|
||||
uint8_t pin = col_pins[i];
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
void select_row(uint8_t current_row) {
|
||||
for ( uint8_t i = 0 ; i < NUM_ROW_PINS; ++i ) {
|
||||
uint8_t pin = row_pins[i] ;
|
||||
if ( check_bit( current_row, i ) ) {
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
} else {
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
}
|
||||
wait_us(30) ;
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
void select_col(uint8_t current_col) {
|
||||
for ( uint8_t i = 0 ; i < NUM_COL_PINS; ++i ) {
|
||||
uint8_t pin = col_pins[i] ;
|
||||
if ( check_bit( current_col, i ) ) {
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
} else {
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
}
|
||||
wait_us(30) ;
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
uint8_t matrix_strobe(uint8_t col_index) {
|
||||
uint8_t strobe_pin = MATRIX_STROBE_PIN ;
|
||||
uint8_t data_pin = MATRIX_DATA_PIN ;
|
||||
|
||||
// set strobe pin low
|
||||
_SFR_IO8((strobe_pin >> 4) + 2) &= ~_BV(strobe_pin & 0xF);
|
||||
|
||||
wait_us(30) ;
|
||||
|
||||
// read data
|
||||
uint8_t data = (_SFR_IO8(data_pin >> 4) & _BV(data_pin & 0xF)) ;
|
||||
|
||||
// set strobe pin hi
|
||||
_SFR_IO8((strobe_pin >> 4) + 2) |= _BV(strobe_pin & 0xF);
|
||||
|
||||
uint8_t out = data ? (1 << col_index) : 0 ;
|
||||
return out ;
|
||||
}
|
||||
|
||||
static
|
||||
bool matrix_read(uint8_t current_matrix[], uint8_t current_row) {
|
||||
// Store last value of row prior to reading
|
||||
uint8_t last_row_value = current_matrix[current_row];
|
||||
|
||||
// Clear data in matrix row
|
||||
current_matrix[current_row] = 0;
|
||||
|
||||
select_row(current_row);
|
||||
|
||||
// For each col...
|
||||
for(uint8_t col_index = 0; col_index < MATRIX_COLS; ++col_index) {
|
||||
|
||||
select_col(col_index) ;
|
||||
|
||||
// strobe the matrix
|
||||
// Populate the matrix row with the state of the data pin
|
||||
current_matrix[current_row] |= matrix_strobe(col_index) ;
|
||||
}
|
||||
|
||||
bool test = last_row_value != current_matrix[current_row] ;
|
||||
return test ;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__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;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_get_row(uint8_t row) {
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
init_led() ;
|
||||
init_rows() ;
|
||||
init_cols() ;
|
||||
init_data() ;
|
||||
init_strobe() ;
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
matrix_debounce [i] = 0;
|
||||
# endif
|
||||
}
|
||||
|
||||
matrix_init_quantum() ;
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void) {
|
||||
for ( uint8_t current_row = 0; current_row < MATRIX_ROWS; ++current_row ) {
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
bool matrix_changed = matrix_read(matrix_debounce, current_row);
|
||||
|
||||
if (matrix_changed) {
|
||||
debouncing = true ;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
|
||||
# else
|
||||
matrix_read(matrix, current_row);
|
||||
# endif
|
||||
}
|
||||
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = matrix_debounce[i];
|
||||
}
|
||||
debouncing = false;
|
||||
}
|
||||
# endif
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void matrix_print(void) {
|
||||
print_matrix_header();
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
print_matrix_row(row);
|
||||
print("\n");
|
||||
}
|
||||
}
|
96
keyboards/converter/ibm_5291/matrix.csv
Normal file
96
keyboards/converter/ibm_5291/matrix.csv
Normal file
@@ -0,0 +1,96 @@
|
||||
0,Z
|
||||
1,S
|
||||
2,W
|
||||
3,3
|
||||
4,X
|
||||
5,D
|
||||
6,E
|
||||
7,4
|
||||
8,C
|
||||
9,F
|
||||
10,R
|
||||
11,5
|
||||
12,V
|
||||
13,G
|
||||
14,T
|
||||
15,6
|
||||
16,B
|
||||
17,H
|
||||
18,Y
|
||||
19,7
|
||||
20,N
|
||||
21,J
|
||||
22,U
|
||||
23,8
|
||||
24,PAD_2
|
||||
25,PAD_5
|
||||
26,PAD_8
|
||||
27,NUM_LOCK
|
||||
28,M
|
||||
29,K
|
||||
30,I
|
||||
31,9
|
||||
32,COMMA
|
||||
33,L
|
||||
34,O
|
||||
35,0
|
||||
36,PERIOD
|
||||
37,SEMICOLON
|
||||
38,P
|
||||
39,MINUS
|
||||
40,SLASH
|
||||
41,QUOTE
|
||||
42,LEFT_BRACE
|
||||
43,EQUAL
|
||||
44,SPACE
|
||||
45,RSHIFT
|
||||
46,BACK_QUOTE
|
||||
47,RIGHT_BRACE
|
||||
48,CAPS_LOCK
|
||||
49,PAD_ASTERIX
|
||||
50,ENTER
|
||||
51,BACKSPACE
|
||||
52,PAD_0
|
||||
53,PAD_1
|
||||
54,PAD_4
|
||||
55,PAD_7
|
||||
56,PAD_PLUS
|
||||
57,UNASSIGNED
|
||||
58,PAD_MINUS
|
||||
59,SCROLL_LOCK
|
||||
60,PAD_PERIOD
|
||||
61,PAD_3
|
||||
62,PAD_6
|
||||
63,PAD_9
|
||||
64,BACKSLASH
|
||||
65,A
|
||||
66,Q
|
||||
67,2
|
||||
68,LALT
|
||||
69,UNASSIGNED
|
||||
70,UNASSIGNED
|
||||
71,1
|
||||
72,F7
|
||||
73,F5
|
||||
74,F3
|
||||
75,F1
|
||||
76,F8
|
||||
77,F6
|
||||
78,F4
|
||||
79,F2
|
||||
80,F10
|
||||
81,UNASSIGNED
|
||||
82,UNASSIGNED
|
||||
83,UNASSIGNED
|
||||
84,F9
|
||||
85,UNASSIGNED
|
||||
86,UNASSIGNED
|
||||
87,UNASSIGNED
|
||||
88,LSHIFT
|
||||
89,LCTRL
|
||||
90,TAB
|
||||
91,ESC
|
||||
92,UNASSIGNED
|
||||
93,UNASSIGNED
|
||||
94,UNASSIGNED
|
||||
95,UNASSIGNED
|
|
70
keyboards/converter/ibm_5291/readme.md
Normal file
70
keyboards/converter/ibm_5291/readme.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# IBM 5291 keyboard converter
|
||||
|
||||

|
||||
|
||||
A converter for the eponymous keyboard.
|
||||
|
||||
Keyboard Maintainer: [Listofoptions](https://github.com/listofoptions)
|
||||
Hardware Supported: IBM 5291, Teensy 2.0
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make converter/ibm_5291: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).
|
||||
|
||||
|
||||
the pinout is as follows:
|
||||
|
||||
IBM−5291−Cable to Pinhead−14
|
||||
|
||||
| pin | description
|
||||
----|------------------------
|
||||
1 | GND
|
||||
2 | NC
|
||||
3 | GND
|
||||
4 | GN)
|
||||
5 | +5V
|
||||
6 | D0
|
||||
7 | D1
|
||||
8 | D2
|
||||
9 | D3
|
||||
10| D4
|
||||
11| D5
|
||||
12| D6
|
||||
13| Strobe
|
||||
14| Out
|
||||
|
||||
the pins on this connector are organized 
|
||||
|
||||
IBM−5291−2 Cable with DB15M connector
|
||||
|
||||
| pin | description
|
||||
----|-------------
|
||||
|1,2,3 | GND
|
||||
|4 | +5V
|
||||
|5 | D0
|
||||
|6 | D1
|
||||
|7 | D2
|
||||
|8 | D3
|
||||
|9 | D4
|
||||
|10 | D5
|
||||
|11 | D6
|
||||
|12 | Strobe
|
||||
|13 | Out
|
||||
|14 | PE
|
||||
|15 | NC
|
||||
|
||||
the above connector is actually numbered so it should be easier to determine
|
||||
where the needed connections are.
|
||||
|
||||
to connect to the teensy, the following are pins are needed (if you should choose not set your own):
|
||||
* PB0 -> PB6 are connected to D0 -> D6
|
||||
* +5V is connected to the corresponding teensy pin
|
||||
* gnd is as well, only one of the gnd pins needs to be connected though.
|
||||
* strobe is connected to pin PD1
|
||||
* data is connected to PD0
|
||||
* PE does not need to be connected to anything, but it could also be connected to gnd
|
||||
|
||||
sources:
|
||||
http://www.retrocomputing.eu/documents/5291_MaintenanceLibrary.pdf
|
72
keyboards/converter/ibm_5291/rules.mk
Normal file
72
keyboards/converter/ibm_5291/rules.mk
Normal file
@@ -0,0 +1,72 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
# 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 = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # 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
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
API_SYSEX_ENABLE = no
|
||||
SPLIT_KEYBOARD = no
|
||||
WAIT_FOR_USB = 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
|
||||
|
||||
LAYOUTS_HAS_RGB = NO
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
SRC = matrix.c
|
@@ -1,40 +0,0 @@
|
||||
Keyboard converter for IBM terminal keyboard
|
||||
============================================
|
||||
|
||||
This is a port of TMK's converter/terminal_usb to QMK.
|
||||
|
||||
It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy.
|
||||
I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
|
||||
|
||||
Source code: https://github.com/qmk/qmk_firmware.git
|
||||
Article: http://geekhack.org/index.php?topic=27272.0
|
||||
|
||||
|
||||
CONNECTION
|
||||
----------
|
||||
Keyboard ATMega32U4
|
||||
----------------------
|
||||
Data: PD2
|
||||
Clock: PD5
|
||||
|
||||
And VCC and GND, of course. See RESOURCE for keyboard connector pin assign.
|
||||
|
||||
|
||||
BUILD
|
||||
-----
|
||||
$ git clone https://github.com/qmk/qmk_firmware.git
|
||||
$ cd qmk_firmware
|
||||
$ make converter/ibm_terminal:default
|
||||
|
||||
|
||||
RESOURCE
|
||||
--------
|
||||
Soarer's Converter: http://geekhack.org/index.php?topic=17458.0
|
||||
102keys(1392595): http://geekhack.org/index.php?topic=10737.0
|
||||
122keys(1390876): http://www.seasip.info/VintagePC/ibm_1390876.html
|
||||
KbdBabel: http://www.kbdbabel.org/
|
||||
RJ45 Connector: http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
|
||||
DIN Connector: http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png
|
||||
WinAVR: http://winavr.sourceforge.net/
|
||||
|
||||
EOF
|
@@ -19,7 +19,7 @@ void matrix_init_user(void);
|
||||
* 17| |
|
||||
* +---------+
|
||||
*/
|
||||
#define KEYMAP( \
|
||||
#define LAYOUT( \
|
||||
K08,K10,K18,K20,K28,K30,K38,K40,K48,K50,K57,K5F, \
|
||||
K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, \
|
||||
\
|
||||
@@ -45,13 +45,13 @@ void matrix_init_user(void);
|
||||
{ K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
|
||||
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
|
||||
{ K78, K79, K7A, K7B, K7C, K7D, K7E, KC_NO }, \
|
||||
{ KC_NO, KC_NO, KC_NO, K83, K84, KC_NO, KC_NO, KC_NO,}, \
|
||||
{ KC_NO, KC_NO, KC_NO, K83, K84, KC_NO, KC_NO, KC_NO } \
|
||||
}
|
||||
|
||||
/*
|
||||
* IBM Terminal keyboard 1399625, 101-key
|
||||
*/
|
||||
#define KEYMAP_101( \
|
||||
#define LAYOUT_101( \
|
||||
K08, K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, K57,K5F,K62, \
|
||||
\
|
||||
K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, K67,K6E,K6F, K76,K77,K7E,K84, \
|
||||
@@ -76,7 +76,7 @@ void matrix_init_user(void);
|
||||
{ KC_NO, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
|
||||
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
|
||||
{ KC_NO, K79, K7A, KC_NO, K7C, K7D, K7E, KC_NO }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KC_NO,}, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KC_NO } \
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
245
keyboards/converter/ibm_terminal/info.json
Normal file
245
keyboards/converter/ibm_terminal/info.json
Normal file
@@ -0,0 +1,245 @@
|
||||
{
|
||||
"keyboard_name": "Keyboard converter for IBM terminal keyboard",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 24.75,
|
||||
"height": 8,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"F13", "x":3.25, "y":0},
|
||||
{"label":"F14", "x":4.25, "y":0},
|
||||
{"label":"F15", "x":5.25, "y":0},
|
||||
{"label":"F16", "x":6.25, "y":0},
|
||||
{"label":"F17", "x":7.25, "y":0},
|
||||
{"label":"F18", "x":8.25, "y":0},
|
||||
{"label":"F19", "x":9.25, "y":0},
|
||||
{"label":"F20", "x":10.25, "y":0},
|
||||
{"label":"F21", "x":11.25, "y":0},
|
||||
{"label":"F22", "x":12.25, "y":0},
|
||||
{"label":"F23", "x":13.25, "y":0},
|
||||
{"label":"F24", "x":14.25, "y":0},
|
||||
{"label":"F1", "x":3.25, "y":1},
|
||||
{"label":"F2", "x":4.25, "y":1},
|
||||
{"label":"F3", "x":5.25, "y":1},
|
||||
{"label":"F4", "x":6.25, "y":1},
|
||||
{"label":"F5", "x":7.25, "y":1},
|
||||
{"label":"F6", "x":8.25, "y":1},
|
||||
{"label":"F7", "x":9.25, "y":1},
|
||||
{"label":"F8", "x":10.25, "y":1},
|
||||
{"label":"F9", "x":11.25, "y":1},
|
||||
{"label":"F10", "x":12.25, "y":1},
|
||||
{"label":"F11", "x":13.25, "y":1},
|
||||
{"label":"F12", "x":14.25, "y":1},
|
||||
{"label":"Print Screen", "x":0, "y":3},
|
||||
{"label":"Esc", "x":1, "y":3},
|
||||
{"label":"Esc", "x":2.25, "y":3},
|
||||
{"label":"1", "x":3.25, "y":3},
|
||||
{"label":"2", "x":4.25, "y":3},
|
||||
{"label":"3", "x":5.25, "y":3},
|
||||
{"label":"4", "x":6.25, "y":3},
|
||||
{"label":"5", "x":7.25, "y":3},
|
||||
{"label":"6", "x":8.25, "y":3},
|
||||
{"label":"7", "x":9.25, "y":3},
|
||||
{"label":"8", "x":10.25, "y":3},
|
||||
{"label":"9", "x":11.25, "y":3},
|
||||
{"label":"0", "x":12.25, "y":3},
|
||||
{"label":"-", "x":13.25, "y":3},
|
||||
{"label":"=", "x":14.25, "y":3},
|
||||
{"label":"No", "x":15.25, "y":3},
|
||||
{"label":"Back Space", "x":16.25, "y":3},
|
||||
{"label":"Insert", "x":17.5, "y":3},
|
||||
{"label":"Home", "x":18.5, "y":3},
|
||||
{"label":"Page Up", "x":19.5, "y":3},
|
||||
{"label":"Num Lock", "x":20.75, "y":3},
|
||||
{"label":"/", "x":21.75, "y":3},
|
||||
{"label":"*", "x":22.75, "y":3},
|
||||
{"label":"-", "x":23.75, "y":3},
|
||||
{"label":"Scroll Lock", "x":0, "y":4},
|
||||
{"label":"Int4", "x":1, "y":4},
|
||||
{"label":"Tab", "x":2.25, "y":4, "w":1.5},
|
||||
{"label":"Q", "x":3.75, "y":4},
|
||||
{"label":"W", "x":4.75, "y":4},
|
||||
{"label":"E", "x":5.75, "y":4},
|
||||
{"label":"R", "x":6.75, "y":4},
|
||||
{"label":"T", "x":7.75, "y":4},
|
||||
{"label":"Y", "x":8.75, "y":4},
|
||||
{"label":"U", "x":9.75, "y":4},
|
||||
{"label":"I", "x":10.75, "y":4},
|
||||
{"label":"O", "x":11.75, "y":4},
|
||||
{"label":"P", "x":12.75, "y":4},
|
||||
{"label":"[", "x":13.75, "y":4},
|
||||
{"label":"]", "x":14.75, "y":4},
|
||||
{"label":"No", "x":15.75, "y":4, "w":1.5},
|
||||
{"label":"Delete", "x":17.5, "y":4},
|
||||
{"label":"End", "x":18.5, "y":4},
|
||||
{"label":"Page Down", "x":19.5, "y":4},
|
||||
{"label":"7", "x":20.75, "y":4},
|
||||
{"label":"8", "x":21.75, "y":4},
|
||||
{"label":"9", "x":22.75, "y":4},
|
||||
{"label":"+", "x":23.75, "y":4},
|
||||
{"label":"Pause", "x":0, "y":5},
|
||||
{"label":"Int5", "x":1, "y":5},
|
||||
{"label":"Caps Lock", "x":2.25, "y":5, "w":1.75},
|
||||
{"label":"A", "x":4, "y":5},
|
||||
{"label":"S", "x":5, "y":5},
|
||||
{"label":"D", "x":6, "y":5},
|
||||
{"label":"F", "x":7, "y":5},
|
||||
{"label":"G", "x":8, "y":5},
|
||||
{"label":"H", "x":9, "y":5},
|
||||
{"label":"J", "x":10, "y":5},
|
||||
{"label":"K", "x":11, "y":5},
|
||||
{"label":"L", "x":12, "y":5},
|
||||
{"label":";", "x":13, "y":5},
|
||||
{"label":"'", "x":14, "y":5},
|
||||
{"label":"\\", "x":15, "y":5},
|
||||
{"label":"Enter", "x":16, "y":5, "w":1.25},
|
||||
{"label":"Up", "x":18.5, "y":5},
|
||||
{"label":"4", "x":20.75, "y":5},
|
||||
{"label":"5", "x":21.75, "y":5},
|
||||
{"label":"6", "x":22.75, "y":5},
|
||||
{"label":",", "x":23.75, "y":5},
|
||||
{"label":"App", "x":0, "y":6},
|
||||
{"label":"Int6", "x":1, "y":6},
|
||||
{"label":"Shift", "x":2.25, "y":6, "w":1.25},
|
||||
{"label":"ISO \\", "x":3.5, "y":6},
|
||||
{"label":"Z", "x":4.5, "y":6},
|
||||
{"label":"X", "x":5.5, "y":6},
|
||||
{"label":"C", "x":6.5, "y":6},
|
||||
{"label":"V", "x":7.5, "y":6},
|
||||
{"label":"B", "x":8.5, "y":6},
|
||||
{"label":"N", "x":9.5, "y":6},
|
||||
{"label":"M", "x":10.5, "y":6},
|
||||
{"label":",", "x":11.5, "y":6},
|
||||
{"label":".", "x":12.5, "y":6},
|
||||
{"label":"/", "x":13.5, "y":6},
|
||||
{"label":"No", "x":14.5, "y":6},
|
||||
{"label":"Shift", "x":15.5, "y":6, "w":1.75},
|
||||
{"label":"Left", "x":17.5, "y":6},
|
||||
{"label":"Int2", "x":18.5, "y":6},
|
||||
{"label":"Right", "x":19.5, "y":6},
|
||||
{"label":"1", "x":20.75, "y":6},
|
||||
{"label":"2", "x":21.75, "y":6},
|
||||
{"label":"3", "x":22.75, "y":6},
|
||||
{"label":"Enter", "x":23.75, "y":6},
|
||||
{"label":"RGUI", "x":0, "y":7},
|
||||
{"label":"lgui", "x":1, "y":7},
|
||||
{"label":"Ctrl", "x":2.25, "y":7, "w":1.5},
|
||||
{"label":"Alt", "x":4.75, "y":7, "w":1.5},
|
||||
{"label":"Space", "x":6.25, "y":7, "w":7},
|
||||
{"label":"Alt", "x":13.25, "y":7, "w":1.5},
|
||||
{"label":"Ctrl", "x":15.75, "y":7, "w":1.5},
|
||||
{"label":"Down", "x":18.5, "y":7},
|
||||
{"label":"No", "x":20.75, "y":7},
|
||||
{"label":"0", "x":21.75, "y":7},
|
||||
{"label":".", "x":22.75, "y":7},
|
||||
{"label":"No", "x":23.75, "y":7}
|
||||
]
|
||||
},
|
||||
"LAYOUT_101": {
|
||||
"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":"Print Screen", "x":15.25, "y":0},
|
||||
{"label":"Scroll Lock", "x":16.25, "y":0},
|
||||
{"label":"Pause", "x":17.25, "y":0},
|
||||
{"label":"`", "x":0, "y":2},
|
||||
{"label":"1", "x":1, "y":2},
|
||||
{"label":"2", "x":2, "y":2},
|
||||
{"label":"3", "x":3, "y":2},
|
||||
{"label":"4", "x":4, "y":2},
|
||||
{"label":"5", "x":5, "y":2},
|
||||
{"label":"6", "x":6, "y":2},
|
||||
{"label":"7", "x":7, "y":2},
|
||||
{"label":"8", "x":8, "y":2},
|
||||
{"label":"9", "x":9, "y":2},
|
||||
{"label":"0", "x":10, "y":2},
|
||||
{"label":"-", "x":11, "y":2},
|
||||
{"label":"=", "x":12, "y":2},
|
||||
{"label":"Back Space", "x":13, "y":2, "w":2},
|
||||
{"label":"Insert", "x":15.25, "y":2},
|
||||
{"label":"Home", "x":16.25, "y":2},
|
||||
{"label":"Page Up", "x":17.25, "y":2},
|
||||
{"label":"Num Lock", "x":18.5, "y":2},
|
||||
{"label":"/", "x":19.5, "y":2},
|
||||
{"label":"*", "x":20.5, "y":2},
|
||||
{"label":"-", "x":21.5, "y":2},
|
||||
{"label":"Tab", "x":0, "y":3, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":3},
|
||||
{"label":"W", "x":2.5, "y":3},
|
||||
{"label":"E", "x":3.5, "y":3},
|
||||
{"label":"R", "x":4.5, "y":3},
|
||||
{"label":"T", "x":5.5, "y":3},
|
||||
{"label":"Y", "x":6.5, "y":3},
|
||||
{"label":"U", "x":7.5, "y":3},
|
||||
{"label":"I", "x":8.5, "y":3},
|
||||
{"label":"O", "x":9.5, "y":3},
|
||||
{"label":"P", "x":10.5, "y":3},
|
||||
{"label":"[", "x":11.5, "y":3},
|
||||
{"label":"]", "x":12.5, "y":3},
|
||||
{"label":"\\", "x":13.5, "y":3, "w":1.5},
|
||||
{"label":"Delete", "x":15.25, "y":3},
|
||||
{"label":"End", "x":16.25, "y":3},
|
||||
{"label":"Page Down", "x":17.25, "y":3},
|
||||
{"label":"7", "x":18.5, "y":3},
|
||||
{"label":"8", "x":19.5, "y":3},
|
||||
{"label":"9", "x":20.5, "y":3},
|
||||
{"label":"Caps Lock", "x":0, "y":4, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":4},
|
||||
{"label":"S", "x":2.75, "y":4},
|
||||
{"label":"D", "x":3.75, "y":4},
|
||||
{"label":"F", "x":4.75, "y":4},
|
||||
{"label":"G", "x":5.75, "y":4},
|
||||
{"label":"H", "x":6.75, "y":4},
|
||||
{"label":"J", "x":7.75, "y":4},
|
||||
{"label":"K", "x":8.75, "y":4},
|
||||
{"label":"L", "x":9.75, "y":4},
|
||||
{"label":";", "x":10.75, "y":4},
|
||||
{"label":"'", "x":11.75, "y":4},
|
||||
{"label":"Enter", "x":12.75, "y":4, "w":2.25},
|
||||
{"label":"4", "x":18.5, "y":4},
|
||||
{"label":"5", "x":19.5, "y":4},
|
||||
{"label":"6", "x":20.5, "y":4},
|
||||
{"label":"+", "x":21.5, "y":3, "h":2},
|
||||
{"label":"Shift", "x":0, "y":5, "w":2.25},
|
||||
{"label":"Z", "x":2.25, "y":5},
|
||||
{"label":"X", "x":3.25, "y":5},
|
||||
{"label":"C", "x":4.25, "y":5},
|
||||
{"label":"V", "x":5.25, "y":5},
|
||||
{"label":"B", "x":6.25, "y":5},
|
||||
{"label":"N", "x":7.25, "y":5},
|
||||
{"label":"M", "x":8.25, "y":5},
|
||||
{"label":",", "x":9.25, "y":5},
|
||||
{"label":".", "x":10.25, "y":5},
|
||||
{"label":"/", "x":11.25, "y":5},
|
||||
{"label":"Shift", "x":12.25, "y":5, "w":2.75},
|
||||
{"label":"Up", "x":16.25, "y":5},
|
||||
{"label":"1", "x":18.5, "y":5},
|
||||
{"label":"2", "x":19.5, "y":5},
|
||||
{"label":"3", "x":20.5, "y":5},
|
||||
{"label":"Ctrl", "x":0, "y":6, "w":1.5},
|
||||
{"label":"Alt", "x":2.5, "y":6, "w":1.5},
|
||||
{"label":"Space", "x":4, "y":6, "w":7},
|
||||
{"label":"Alt", "x":11, "y":6, "w":1.5},
|
||||
{"label":"Ctrl", "x":13.5, "y":6, "w":1.5},
|
||||
{"label":"Left", "x":15.25, "y":6},
|
||||
{"label":"Down", "x":16.25, "y":6},
|
||||
{"label":"Right", "x":17.25, "y":6},
|
||||
{"label":"0", "x":18.5, "y":6, "w":2},
|
||||
{"label":".", "x":20.5, "y":6},
|
||||
{"label":"Enter", "x":21.5, "y":5, "h":2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,3 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#pragma once
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#endif
|
||||
// place overrides here
|
||||
|
@@ -15,18 +15,12 @@ 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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "keycode.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "ibm_terminal.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Layer 0
|
||||
|
||||
KEYMAP(
|
||||
LAYOUT(
|
||||
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
|
||||
@@ -56,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `----' `---------------------------------------' `----' `-----------' `---------------'
|
||||
*/
|
||||
/*
|
||||
KEYMAP_101(
|
||||
LAYOUT_101(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK, KC_BRK,
|
||||
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
|
||||
|
@@ -1,6 +1,3 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#pragma once
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#endif
|
||||
// place overrides here
|
||||
|
@@ -15,17 +15,7 @@ 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 "keycode.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "ibm_terminal.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
// Fillers to make layering clearer
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
QWE, // qwerty
|
||||
@@ -159,7 +149,7 @@ const uint32_t PROGMEM unicode_map[] = {
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* qwerty */
|
||||
[QWE] = KEYMAP(
|
||||
[QWE] = LAYOUT(
|
||||
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
|
||||
@@ -171,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
/* colemak */
|
||||
[COL] = KEYMAP(
|
||||
[COL] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
@@ -183,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
/* workman */
|
||||
[WOR] = KEYMAP(
|
||||
[WOR] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
@@ -195,7 +185,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
/* dvorak */
|
||||
[DVO] = KEYMAP(
|
||||
[DVO] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
@@ -207,7 +197,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
/* system */
|
||||
[SYS] = KEYMAP(
|
||||
[SYS] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
@@ -219,7 +209,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
/* mouse keys */
|
||||
[MOU] = KEYMAP(
|
||||
[MOU] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
@@ -231,7 +221,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
/* emoji */
|
||||
[EMO] = KEYMAP(
|
||||
[EMO] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
@@ -243,7 +233,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
/*
|
||||
[XXX] = KEYMAP(
|
||||
[XXX] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
|
39
keyboards/converter/ibm_terminal/readme.md
Normal file
39
keyboards/converter/ibm_terminal/readme.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Keyboard converter for IBM terminal keyboard
|
||||
|
||||
This is a port of TMK's converter/terminal_usb to QMK.
|
||||
|
||||
It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy.
|
||||
I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
|
||||
|
||||
Source code: https://github.com/qmk/qmk_firmware.git
|
||||
Article: http://geekhack.org/index.php?topic=27272.0
|
||||
|
||||
|
||||
## Connection
|
||||
|
||||
Keyboard | ATMega32U4
|
||||
:------- | :---------
|
||||
Data | PD2
|
||||
Clock | PD5
|
||||
|
||||
And VCC and GND, of course. See Resource section for keyboard connector pin assign.
|
||||
|
||||
|
||||
## Build
|
||||
|
||||
```
|
||||
git clone https://github.com/qmk/qmk_firmware.git
|
||||
cd qmk_firmware
|
||||
make converter/ibm_terminal:default
|
||||
```
|
||||
|
||||
## Resource
|
||||
|
||||
- Soarer's Converter: http://geekhack.org/index.php?topic=17458.0
|
||||
- 102keys(1392595): http://geekhack.org/index.php?topic=10737.0
|
||||
- 122keys(1390876): http://www.seasip.info/VintagePC/ibm_1390876.html
|
||||
- KbdBabel: http://www.kbdbabel.org/
|
||||
- RJ45 Connector: http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
|
||||
- DIN Connector: http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png
|
||||
- WinAVR: http://winavr.sourceforge.net/
|
||||
|
@@ -1,19 +1,19 @@
|
||||
M0110(A) keyboard converter
|
||||
======================================
|
||||
# M0110(A) keyboard converter
|
||||
|
||||
This is a port of the original M0110 converter from TMK to QMK. The original converter was designed to work with **ATmega32U2** and **ATmega32U4** based microcontrollers to convert Apple M0110/M0110A keyboards and M0120 numpads to USB. This port has been tested to be compatible with the [**Adafruit Feather 32U4 BLE**](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le).
|
||||
|
||||
|
||||
### Enabling Bluetooth for the Adafruit Feather 32U4 BLE
|
||||
----------------------------------------------------
|
||||
## Enabling Bluetooth for the Adafruit Feather 32U4 BLE
|
||||
|
||||
Simply add `BLUETOOTH = AdafruitBLE` to your `rules.mk` file. This enables code specifically for the Adafruit Feather 32U4 BLE. If enabled, the device will use the `PRODUCT` and `DESCRIPTION` values from `config.h` for the device name displayed by the Feather on host devices. You can simply change these values to change the device name.
|
||||
|
||||
|
||||
### Pins
|
||||
----
|
||||
## Pins
|
||||
|
||||
This port utilizes the same pins that the TMK converter used. `PD1` is used for `CLOCK` and `PD0` is used for the `DATA` from the keyboard. These pins can be changed in `config.h`.
|
||||
|
||||
|
||||
### Other important hardware notes from the original TMK converter Readme:
|
||||
## Other important hardware notes from the original TMK converter Readme:
|
||||
>### Hardware
|
||||
>--------
|
||||
>You can buy preassembled [TMK converter] or make yourown with AVR dev board like PJRC [Teensy].
|
||||
@@ -45,7 +45,7 @@ This port utilizes the same pins that the TMK converter used. `PD1` is used for
|
||||
[**View the original TMK converter Repository**](https://github.com/tmk/tmk_keyboard/tree/master/converter/m0110_usb)
|
||||
|
||||
|
||||
### QMK Port Changelog
|
||||
---------
|
||||
## QMK Port Changelog
|
||||
|
||||
- 2018/08/01 - Original Release
|
||||
|
||||
|
172
keyboards/converter/m0110_usb/info.json
Normal file
172
keyboards/converter/m0110_usb/info.json
Normal file
@@ -0,0 +1,172 @@
|
||||
{
|
||||
"keyboard_name": "M0110(A) keyboard converter",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 19.25,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_ansi": {
|
||||
"key_count": 78,
|
||||
"layout": [
|
||||
{"label":"`", "x":0, "y":0},
|
||||
{"label":"1", "x":1, "y":0},
|
||||
{"label":"2", "x":2, "y":0},
|
||||
{"label":"3", "x":3, "y":0},
|
||||
{"label":"4", "x":4, "y":0},
|
||||
{"label":"5", "x":5, "y":0},
|
||||
{"label":"6", "x":6, "y":0},
|
||||
{"label":"7", "x":7, "y":0},
|
||||
{"label":"8", "x":8, "y":0},
|
||||
{"label":"9", "x":9, "y":0},
|
||||
{"label":"0", "x":10, "y":0},
|
||||
{"label":"-", "x":11, "y":0},
|
||||
{"label":"=", "x":12, "y":0},
|
||||
{"label":"Backspace", "x":13, "y":0, "w":1.5},
|
||||
{"label":"Num Lock", "x":15.25, "y":0},
|
||||
{"label":"=", "x":16.25, "y":0},
|
||||
{"label":"/", "x":17.25, "y":0},
|
||||
{"label":"*", "x":18.25, "y":0},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":1},
|
||||
{"label":"W", "x":2.5, "y":1},
|
||||
{"label":"E", "x":3.5, "y":1},
|
||||
{"label":"R", "x":4.5, "y":1},
|
||||
{"label":"T", "x":5.5, "y":1},
|
||||
{"label":"Y", "x":6.5, "y":1},
|
||||
{"label":"U", "x":7.5, "y":1},
|
||||
{"label":"I", "x":8.5, "y":1},
|
||||
{"label":"O", "x":9.5, "y":1},
|
||||
{"label":"P", "x":10.5, "y":1},
|
||||
{"label":"[", "x":11.5, "y":1},
|
||||
{"label":"]", "x":12.5, "y":1},
|
||||
{"label":"7", "x":15.25, "y":1},
|
||||
{"label":"8", "x":16.25, "y":1},
|
||||
{"label":"9", "x":17.25, "y":1},
|
||||
{"label":"-", "x":18.25, "y":1},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":2},
|
||||
{"label":"S", "x":2.75, "y":2},
|
||||
{"label":"D", "x":3.75, "y":2},
|
||||
{"label":"F", "x":4.75, "y":2},
|
||||
{"label":"G", "x":5.75, "y":2},
|
||||
{"label":"H", "x":6.75, "y":2},
|
||||
{"label":"J", "x":7.75, "y":2},
|
||||
{"label":"K", "x":8.75, "y":2},
|
||||
{"label":"L", "x":9.75, "y":2},
|
||||
{"label":";", "x":10.75, "y":2},
|
||||
{"label":"'", "x":11.75, "y":2},
|
||||
{"label":"Enter", "x":12.75, "y":2, "w":1.75},
|
||||
{"label":"4", "x":15.25, "y":2},
|
||||
{"label":"5", "x":16.25, "y":2},
|
||||
{"label":"6", "x":17.25, "y":2},
|
||||
{"label":"+", "x":18.25, "y":2},
|
||||
{"label":"Shift", "x":0, "y":3, "w":2.25},
|
||||
{"label":"Z", "x":2.25, "y":3},
|
||||
{"label":"X", "x":3.25, "y":3},
|
||||
{"label":"C", "x":4.25, "y":3},
|
||||
{"label":"V", "x":5.25, "y":3},
|
||||
{"label":"B", "x":6.25, "y":3},
|
||||
{"label":"N", "x":7.25, "y":3},
|
||||
{"label":"M", "x":8.25, "y":3},
|
||||
{"label":",", "x":9.25, "y":3},
|
||||
{"label":".", "x":10.25, "y":3},
|
||||
{"label":"/", "x":11.25, "y":3},
|
||||
{"label":"Up", "x":13.5, "y":3},
|
||||
{"label":"1", "x":15.25, "y":3},
|
||||
{"label":"2", "x":16.25, "y":3},
|
||||
{"label":"3", "x":17.25, "y":3},
|
||||
{"label":"Enter", "x":18.25, "y":3, "h":2},
|
||||
{"label":"Alt", "x":0, "y":4, "w":1.5},
|
||||
{"label":"GUI", "x":1.5, "y":4, "w":2},
|
||||
{"label":"Space", "x":3.5, "y":4, "w":6},
|
||||
{"label":"MO(1)", "x":9.5, "y":4},
|
||||
{"label":"\\", "x":10.5, "y":4},
|
||||
{"label":"Left", "x":11.5, "y":4},
|
||||
{"label":"Right", "x":12.5, "y":4},
|
||||
{"label":"Down", "x":13.5, "y":4},
|
||||
{"label":"0", "x":15.25, "y":4, "w":2},
|
||||
{"label":".", "x":17.25, "y":4}
|
||||
]
|
||||
},
|
||||
"LAYOUT_iso": {
|
||||
"key_count": 75,
|
||||
"layout": [
|
||||
{"label":"`", "x":0, "y":0},
|
||||
{"label":"1", "x":1, "y":0},
|
||||
{"label":"2", "x":2, "y":0},
|
||||
{"label":"3", "x":3, "y":0},
|
||||
{"label":"4", "x":4, "y":0},
|
||||
{"label":"5", "x":5, "y":0},
|
||||
{"label":"6", "x":6, "y":0},
|
||||
{"label":"7", "x":7, "y":0},
|
||||
{"label":"8", "x":8, "y":0},
|
||||
{"label":"9", "x":9, "y":0},
|
||||
{"label":"0", "x":10, "y":0},
|
||||
{"label":"-", "x":11, "y":0},
|
||||
{"label":"=", "x":12, "y":0},
|
||||
{"label":"Backspace", "x":13, "y":0, "w":1.5},
|
||||
{"label":"Num Lock", "x":15.25, "y":0},
|
||||
{"label":"=", "x":16.25, "y":0},
|
||||
{"label":"/", "x":17.25, "y":0},
|
||||
{"label":"*", "x":18.25, "y":0},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":1},
|
||||
{"label":"W", "x":2.5, "y":1},
|
||||
{"label":"E", "x":3.5, "y":1},
|
||||
{"label":"R", "x":4.5, "y":1},
|
||||
{"label":"T", "x":5.5, "y":1},
|
||||
{"label":"Y", "x":6.5, "y":1},
|
||||
{"label":"U", "x":7.5, "y":1},
|
||||
{"label":"I", "x":8.5, "y":1},
|
||||
{"label":"O", "x":9.5, "y":1},
|
||||
{"label":"P", "x":10.5, "y":1},
|
||||
{"label":"[", "x":11.5, "y":1},
|
||||
{"label":"]", "x":12.5, "y":1},
|
||||
{"label":"Return", "x":13.75, "y":1, "w":0.75, "h":2},
|
||||
{"label":"7", "x":15.25, "y":1},
|
||||
{"label":"8", "x":16.25, "y":1},
|
||||
{"label":"9", "x":17.25, "y":1},
|
||||
{"label":"-", "x":18.25, "y":1},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":2},
|
||||
{"label":"S", "x":2.75, "y":2},
|
||||
{"label":"D", "x":3.75, "y":2},
|
||||
{"label":"F", "x":4.75, "y":2},
|
||||
{"label":"G", "x":5.75, "y":2},
|
||||
{"label":"H", "x":6.75, "y":2},
|
||||
{"label":"J", "x":7.75, "y":2},
|
||||
{"label":"K", "x":8.75, "y":2},
|
||||
{"label":"L", "x":9.75, "y":2},
|
||||
{"label":";", "x":10.75, "y":2},
|
||||
{"label":"'", "x":11.75, "y":2},
|
||||
{"label":"#", "x":12.75, "y":2},
|
||||
{"label":"4", "x":15.25, "y":2},
|
||||
{"label":"5", "x":16.25, "y":2},
|
||||
{"label":"6", "x":17.25, "y":2},
|
||||
{"label":"+", "x":18.25, "y":2},
|
||||
{"label":"Shift", "x":0, "y":3, "w":1.25},
|
||||
{"label":"\\", "x":1.25, "y":3},
|
||||
{"label":"Z", "x":2.25, "y":3},
|
||||
{"label":"X", "x":3.25, "y":3},
|
||||
{"label":"C", "x":4.25, "y":3},
|
||||
{"label":"V", "x":5.25, "y":3},
|
||||
{"label":"B", "x":6.25, "y":3},
|
||||
{"label":"N", "x":7.25, "y":3},
|
||||
{"label":"M", "x":8.25, "y":3},
|
||||
{"label":",", "x":9.25, "y":3},
|
||||
{"label":".", "x":10.25, "y":3},
|
||||
{"label":"/", "x":11.25, "y":3},
|
||||
{"label":"1", "x":15.25, "y":3},
|
||||
{"label":"2", "x":16.25, "y":3},
|
||||
{"label":"3", "x":17.25, "y":3},
|
||||
{"label":"Enter", "x":18.25, "y":3, "h":2},
|
||||
{"label":"Option", "x":1, "y":4},
|
||||
{"label":"GUI", "x":2, "y":4, "w":1.5},
|
||||
{"label":"Space", "x":3.5, "y":4, "w":7.5},
|
||||
{"label":"Enter", "x":11, "y":4, "w":1.5},
|
||||
{"label":"0", "x":15.25, "y":4, "w":2},
|
||||
{"label":".", "x":17.25, "y":4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,10 @@
|
||||
#include "crkbd.h"
|
||||
#include "ssd1306.h"
|
||||
#include "ssd1306.h"
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_gfx(keycode,record) && process_record_user(keycode, record);
|
||||
}
|
||||
#ifdef SSD1306OLED
|
||||
return process_record_gfx(keycode,record) && process_record_user(keycode, record);
|
||||
#else
|
||||
return process_record_user(keycode, record);
|
||||
#endif
|
||||
}
|
||||
|
@@ -41,5 +41,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_LIMIT_VAL 100
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define B6_AUDIO
|
||||
// #define NO_MUSIC_MODE
|
||||
#endif
|
||||
|
@@ -26,10 +26,10 @@ enum crkbd_keycodes {
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
||||
LT(_LOWER,KC_GRV), KC_SPC, LALT_T(KC_BSPC), KC_DEL, KC_ENT, RAISE \
|
||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||
)
|
||||
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
||||
|
||||
@@ -66,14 +66,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_wrapper(
|
||||
KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC,
|
||||
KC_F11, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
|
||||
KC_F12, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______,
|
||||
KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
|
||||
KC_F12, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
|
||||
_______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_wrapper( \
|
||||
KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC,
|
||||
_______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______,
|
||||
_______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
|
||||
_______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
@@ -81,18 +81,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_ADJUST] = LAYOUT_wrapper( \
|
||||
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
|
||||
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EPRM,
|
||||
TG_MODS, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
|
||||
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY,
|
||||
_______, _______, _______, KC_NUKE, TG_MODS, _______
|
||||
)
|
||||
};
|
||||
|
||||
int RGB_current_mode;
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
@@ -102,53 +97,118 @@ void matrix_init_keymap(void) {
|
||||
PORTD &= ~(1<<5);
|
||||
|
||||
DDRB &= ~(1<<0);
|
||||
PORTB &= ~(1<<0);}
|
||||
PORTB &= ~(1<<0);
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
// When add source files to SRC in rules.mk, you can use functions.
|
||||
const char *read_layer_state(void);
|
||||
const char *read_logo(void);
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
||||
const char *read_keylog(void);
|
||||
const char *read_keylogs(void);
|
||||
char layer_state_str[24];
|
||||
char modifier_state_str[24];
|
||||
char host_led_state_str[24];
|
||||
char keylog_str[24] = {};
|
||||
char keylogs_str[21] = {};
|
||||
int keylogs_str_idx = 0;
|
||||
|
||||
// const char *read_mode_icon(bool swap);
|
||||
const char *read_host_led_state(void);
|
||||
// void set_timelog(void);
|
||||
// const char *read_timelog(void);
|
||||
|
||||
const char code_to_name[60] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
char name = ' ';
|
||||
if (keycode < 60) {
|
||||
name = code_to_name[keycode];
|
||||
}
|
||||
|
||||
// update keylog
|
||||
snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
|
||||
record->event.key.row, record->event.key.col,
|
||||
keycode, name);
|
||||
|
||||
// update keylogs
|
||||
if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
|
||||
keylogs_str_idx = 0;
|
||||
for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
|
||||
keylogs_str[i] = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
keylogs_str[keylogs_str_idx] = name;
|
||||
keylogs_str_idx++;
|
||||
}
|
||||
|
||||
const char *read_keylog(void) {
|
||||
return keylog_str;
|
||||
}
|
||||
|
||||
const char *read_keylogs(void) {
|
||||
return keylogs_str;
|
||||
}
|
||||
|
||||
|
||||
const char* read_modifier_state(void) {
|
||||
uint8_t modifiers = get_mods();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
|
||||
snprintf(modifier_state_str, sizeof(modifier_state_str), "Mods:%s %s %s %s",
|
||||
(modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) ? "CTL" : " ",
|
||||
(modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK) ? "GUI" : " ",
|
||||
(modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) ? "ALT" : " ",
|
||||
(modifiers & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) ? "SFT" : " "
|
||||
);
|
||||
|
||||
return modifier_state_str;
|
||||
}
|
||||
|
||||
const char *read_host_led_state(void) {
|
||||
uint8_t leds = host_keyboard_leds();
|
||||
|
||||
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
|
||||
(leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
|
||||
(leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
|
||||
(leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "
|
||||
);
|
||||
|
||||
return host_led_state_str;
|
||||
}
|
||||
|
||||
const char* read_layer_state(void) {
|
||||
switch (layer_state) {
|
||||
case _QWERTY:
|
||||
switch (default_layer_state) {
|
||||
switch (biton32(layer_state)) {
|
||||
case _RAISE:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise ");
|
||||
break;
|
||||
case _LOWER:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower ");
|
||||
break;
|
||||
case _ADJUST:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust ");
|
||||
break;
|
||||
default:
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: QWERTY");
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Qwerty ");
|
||||
break;
|
||||
case _COLEMAK:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Colemak");
|
||||
break;
|
||||
case _DVORAK:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak");
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak ");
|
||||
break;
|
||||
case _WORKMAN:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Workman");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case _RAISE:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise");
|
||||
break;
|
||||
case _LOWER:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower");
|
||||
break;
|
||||
case _ADJUST:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust");
|
||||
break;
|
||||
default:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state);
|
||||
}
|
||||
|
||||
return layer_state_str;
|
||||
@@ -160,12 +220,13 @@ void matrix_scan_keymap(void) {
|
||||
|
||||
void matrix_render_user(struct CharacterMatrix *matrix) {
|
||||
if (is_master) {
|
||||
// If you want to change the display of OLED, you need to change here
|
||||
//If you want to change the display of OLED, you need to change here
|
||||
matrix_write_ln(matrix, read_layer_state());
|
||||
matrix_write_ln(matrix, read_keylog());
|
||||
matrix_write_ln(matrix, read_modifier_state());
|
||||
// matrix_write_ln(matrix, read_keylog());
|
||||
matrix_write_ln(matrix, read_keylogs());
|
||||
//matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
||||
matrix_write_ln(matrix, read_host_led_state());
|
||||
// matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
||||
matrix_write(matrix, read_host_led_state());
|
||||
//matrix_write_ln(matrix, read_timelog());
|
||||
} else {
|
||||
matrix_write(matrix, read_logo());
|
||||
@@ -187,8 +248,14 @@ void iota_gfx_task_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
set_keylog(keycode, record);
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_SLASH:
|
||||
case KC_F1 ... KC_F12:
|
||||
case KC_INSERT ... KC_UP:
|
||||
case KC_KP_SLASH ... KC_KP_DOT:
|
||||
case KC_F13 ... KC_F24:
|
||||
if (record->event.pressed) { set_keylog(keycode, record); }
|
||||
break;
|
||||
// set_timelog();
|
||||
}
|
||||
return true;
|
||||
|
@@ -20,12 +20,14 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
BOOTLOADER = qmk-dfu
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += ./lib/glcdfont.c \
|
||||
./lib/rgb_state_reader.c \
|
||||
./lib/logo_reader.c \
|
||||
./lib/keylogger.c \
|
||||
./lib/host_led_state_reader.c \
|
||||
# ./lib/layer_state_reader.c \
|
||||
# ./lib/keylogger.c \
|
||||
# ./lib/host_led_state_reader.c \
|
||||
# ./lib/mode_icon_reader.c \
|
||||
# ./lib/layer_state_reader.c \
|
||||
# ./lib/timelogger.c \
|
||||
|
@@ -63,10 +63,9 @@ int serial_update_buffers(int master_update)
|
||||
if( smatstatus == TRANSACTION_END ) {
|
||||
s_change_old = s_change_new;
|
||||
#ifdef CONSOLE_ENABLE
|
||||
uprintf("slave matrix = %b %b %b %b %b\n",
|
||||
uprintf("slave matrix = %b %b %b %b\n",
|
||||
serial_slave_buffer[0], serial_slave_buffer[1],
|
||||
serial_slave_buffer[2], serial_slave_buffer[3],
|
||||
serial_slave_buffer[4] );
|
||||
serial_slave_buffer[2], serial_slave_buffer[3]);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
|
@@ -1,12 +1,16 @@
|
||||
{
|
||||
"keyboard_name": "Octagon V2",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 16,
|
||||
"height": 6,
|
||||
"keyboard_name": "Octagon V2",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 16,
|
||||
"height": 6,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":1.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}]
|
||||
},
|
||||
|
||||
"LAYOUT_75_ansi": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1, "w":2}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":0, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -170,6 +170,33 @@
|
||||
{ k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \
|
||||
}
|
||||
|
||||
/* LAYOUT_60_ansi_split
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||
* │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||
* │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │40 │41 │43 │44 │46 │48 │4a │4b │4d │4e │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
#define LAYOUT_60_ansi_split( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \
|
||||
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
|
||||
k40, k41, k43, k44, k46, k48, k4a, k4b, k4d, k4e \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \
|
||||
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
||||
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, KC_NO }, \
|
||||
{ k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \
|
||||
}
|
||||
|
||||
/* LAYOUT_60_iso
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │
|
||||
|
@@ -25,6 +25,10 @@
|
||||
"key_count": 61,
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
},
|
||||
"LAYOUT_60_ansi_split": {
|
||||
"key_count": 61,
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
},
|
||||
"LAYOUT_60_iso": {
|
||||
"key_count": 62,
|
||||
"layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
|
40
keyboards/dz60/keymaps/zvecr/keymap.c
Normal file
40
keyboards/dz60/keymaps/zvecr/keymap.c
Normal file
@@ -0,0 +1,40 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
/*
|
||||
* Each layer gets a name for readability.
|
||||
* 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, and you can also skip them entirely
|
||||
* and just use numbers.
|
||||
*
|
||||
*/
|
||||
#define BL 0 // Base Layer
|
||||
#define FL 1 // Function Layer
|
||||
#define ML 2 // Macro Layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BL] = LAYOUT_60_ansi_split(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(FL), KC_SPC, KC_RALT, KC_RGUI, MO(ML), KC_RCTL),
|
||||
|
||||
[FL] = LAYOUT_60_ansi_split(
|
||||
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, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______,
|
||||
_______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, KC_DEL, KC_END, KC_PGDN, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
|
||||
[ML] = LAYOUT_60_ansi_split(
|
||||
_______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
};
|
@@ -13,7 +13,7 @@
|
||||
* 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 "ep40.h"
|
||||
#include "40.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
@@ -4,12 +4,12 @@
|
||||
|
||||
A simple 40% keyboard
|
||||
|
||||
Keyboard Maintainer: [Elliot Powell](https://reddit.com/u/e11i0t23, https://github.com/e11i0t23)
|
||||
Keyboard Maintainer: [Elliot Powell](https://github.com/e11i0t23), [/u/e11i0t23 on reddit](https://reddit.com/u/e11i0t23)
|
||||
Hardware Supported: EP40 PCB
|
||||
Hardware Availability: None at the moment
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make ep40:default
|
||||
make ep/40: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).
|
43
keyboards/ep/96/96.c
Normal file
43
keyboards/ep/96/96.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright 2018 Elliot Powell
|
||||
*
|
||||
* 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 "96.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
47
keyboards/ep/96/96.h
Normal file
47
keyboards/ep/96/96.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Copyright 2018 Elliot Powell
|
||||
*
|
||||
* 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 EP96_H
|
||||
#define EP96_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define xxxx KC_NO
|
||||
|
||||
#define LAYOUT( \
|
||||
K000, K001, K002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, k016, k017, k018, \
|
||||
K100, K101, K102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k114, k115, k116, k117, k118, \
|
||||
K200, K202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k215, k216, k217, \
|
||||
K300, K302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, k317, k318, \
|
||||
K400, K401, K402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k413, k414, k415, k416, k417, \
|
||||
K500, K501, K502, k506, k511, k512, k513, k514, k515, k516, k517, k518) \
|
||||
{ \
|
||||
{K000, K001, K002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, k016, k017, k018}, \
|
||||
{K100, K101, K102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, xxxx, k114, k115, k116, k117, k118}, \
|
||||
{K200, xxxx, K202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, xxxx, k215, k216, k217, xxxx}, \
|
||||
{K300, xxxx, K302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, k317, k318}, \
|
||||
{K400, K401, K402, k403, k404, k405, k406, k407, k408, k409, k410, k411, xxxx, k413, k414, k415, k416, k417, xxxx}, \
|
||||
{K500, K501, K502, xxxx, xxxx, xxxx, k506, xxxx, xxxx, xxxx, xxxx, k511, k512, k513, k514, k515, k516, k517, k518} \
|
||||
}
|
||||
|
||||
#endif
|
212
keyboards/ep/96/config.h
Normal file
212
keyboards/ep/96/config.h
Normal file
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
Copyright 2018 Elliot Powell
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x9696
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Elliot Powell
|
||||
#define PRODUCT ep96
|
||||
#define DESCRIPTION A simple 96 key keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 19
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { B0, B1, B3, B2, B7, C6 }
|
||||
#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C7, F7, F6, F5, F4, F1, F0, E6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
// #endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
|
||||
/* 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
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
426
keyboards/ep/96/info.json
Normal file
426
keyboards/ep/96/info.json
Normal file
@@ -0,0 +1,426 @@
|
||||
{
|
||||
"keyboard_name": "ep96",
|
||||
"maintainer": "e11i0t23",
|
||||
"width": 19,
|
||||
"height": 6,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"key_count": 100,
|
||||
"layout": [{
|
||||
"label": "Esc",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F1",
|
||||
"x": 1,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F2",
|
||||
"x": 2,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F3",
|
||||
"x": 3,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F4",
|
||||
"x": 4,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F5",
|
||||
"x": 5,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F6",
|
||||
"x": 6,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F7",
|
||||
"x": 7,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F8",
|
||||
"x": 8,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F9",
|
||||
"x": 9,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F10",
|
||||
"x": 10,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F11",
|
||||
"x": 11,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "F12",
|
||||
"x": 12,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "Prt Sc",
|
||||
"x": 13,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "Delete",
|
||||
"x": 14,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "home",
|
||||
"x": 15,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "Menu",
|
||||
"x": 16,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "Pg Up",
|
||||
"x": 17,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "Pg Dn",
|
||||
"x": 18,
|
||||
"y": 0
|
||||
}, {
|
||||
"label": "~",
|
||||
"x": 0,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "!",
|
||||
"x": 1,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "@",
|
||||
"x": 2,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "#",
|
||||
"x": 3,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "$",
|
||||
"x": 4,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "%",
|
||||
"x": 5,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "^",
|
||||
"x": 6,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "&",
|
||||
"x": 7,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "*",
|
||||
"x": 8,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "(",
|
||||
"x": 9,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": ")",
|
||||
"x": 10,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "_",
|
||||
"x": 11,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "+",
|
||||
"x": 12,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "Backspace",
|
||||
"x": 13,
|
||||
"y": 1,
|
||||
"w": 2
|
||||
}, {
|
||||
"label": "Num Lock",
|
||||
"x": 15,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "/",
|
||||
"x": 16,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "*",
|
||||
"x": 17,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "-",
|
||||
"x": 18,
|
||||
"y": 1
|
||||
}, {
|
||||
"label": "Tab",
|
||||
"x": 0,
|
||||
"y": 2,
|
||||
"w": 1.5
|
||||
}, {
|
||||
"label": "Q",
|
||||
"x": 1.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "W",
|
||||
"x": 2.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "E",
|
||||
"x": 3.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "R",
|
||||
"x": 4.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "T",
|
||||
"x": 5.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "Y",
|
||||
"x": 6.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "U",
|
||||
"x": 7.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "I",
|
||||
"x": 8.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "O",
|
||||
"x": 9.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "P",
|
||||
"x": 10.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "{",
|
||||
"x": 11.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "}",
|
||||
"x": 12.5,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "Enter",
|
||||
"x": 13.75,
|
||||
"y": 2,
|
||||
"w": 1.25,
|
||||
"h": 2
|
||||
}, {
|
||||
"label": "7",
|
||||
"x": 15,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "8",
|
||||
"x": 16,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "9",
|
||||
"x": 17,
|
||||
"y": 2
|
||||
}, {
|
||||
"label": "+",
|
||||
"x": 18,
|
||||
"y": 2,
|
||||
"h": 2
|
||||
}, {
|
||||
"label": "Caps Lock",
|
||||
"x": 0,
|
||||
"y": 3,
|
||||
"w": 1.75
|
||||
}, {
|
||||
"label": "A",
|
||||
"x": 1.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "S",
|
||||
"x": 2.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "D",
|
||||
"x": 3.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "F",
|
||||
"x": 4.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "G",
|
||||
"x": 5.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "H",
|
||||
"x": 6.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "J",
|
||||
"x": 7.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "K",
|
||||
"x": 8.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "L",
|
||||
"x": 9.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": ":",
|
||||
"x": 10.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "\"",
|
||||
"x": 11.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "~",
|
||||
"x": 12.75,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "4",
|
||||
"x": 15,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "5",
|
||||
"x": 16,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "6",
|
||||
"x": 17,
|
||||
"y": 3
|
||||
}, {
|
||||
"label": "Shift",
|
||||
"x": 0,
|
||||
"y": 4,
|
||||
"w": 1.25
|
||||
}, {
|
||||
"label": "|",
|
||||
"x": 1.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "Z",
|
||||
"x": 2.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "X",
|
||||
"x": 3.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "C",
|
||||
"x": 4.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "V",
|
||||
"x": 5.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "B",
|
||||
"x": 6.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "N",
|
||||
"x": 7.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "M",
|
||||
"x": 8.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "<",
|
||||
"x": 9.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": ">",
|
||||
"x": 10.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "?",
|
||||
"x": 11.25,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "Shift",
|
||||
"x": 12.25,
|
||||
"y": 4,
|
||||
"w": 1.75
|
||||
}, {
|
||||
"label": "\u2191",
|
||||
"x": 14,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "1",
|
||||
"x": 15,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "2",
|
||||
"x": 16,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "3",
|
||||
"x": 17,
|
||||
"y": 4
|
||||
}, {
|
||||
"label": "Enter",
|
||||
"x": 18,
|
||||
"y": 4,
|
||||
"h": 2
|
||||
}, {
|
||||
"label": "Ctrl",
|
||||
"x": 0,
|
||||
"y": 5,
|
||||
"w": 1.25
|
||||
}, {
|
||||
"label": "Win",
|
||||
"x": 1.25,
|
||||
"y": 5,
|
||||
"w": 1.25
|
||||
}, {
|
||||
"label": "Alt",
|
||||
"x": 2.5,
|
||||
"y": 5,
|
||||
"w": 1.25
|
||||
}, {
|
||||
"x": 3.75,
|
||||
"y": 5,
|
||||
"w": 6.25
|
||||
}, {
|
||||
"label": "Alt",
|
||||
"x": 10,
|
||||
"y": 5,
|
||||
"w": 1.5
|
||||
}, {
|
||||
"label": "Crtl",
|
||||
"x": 11.5,
|
||||
"y": 5,
|
||||
"w": 1.5
|
||||
}, {
|
||||
"label": "\u2190",
|
||||
"x": 13,
|
||||
"y": 5
|
||||
}, {
|
||||
"label": "\u2193",
|
||||
"x": 14,
|
||||
"y": 5
|
||||
}, {
|
||||
"label": "\u2192",
|
||||
"x": 15,
|
||||
"y": 5
|
||||
}, {
|
||||
"label": "0",
|
||||
"x": 16,
|
||||
"y": 5
|
||||
}, {
|
||||
"label": ".",
|
||||
"x": 17,
|
||||
"y": 5
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
67
keyboards/ep/96/keymaps/default/keymap.c
Normal file
67
keyboards/ep/96/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,67 @@
|
||||
/* Copyright 2018 Elliot Powell
|
||||
*
|
||||
* 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
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
QMKBEST = SAFE_RANGE,
|
||||
QMKURL
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
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_P7, KC_P8, KC_P9, \
|
||||
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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||
KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \
|
||||
),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QMKBEST:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
case QMKURL:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKURL is pressed
|
||||
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
||||
} else {
|
||||
// when keycode QMKURL is released
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
1
keyboards/ep/96/keymaps/default/readme.md
Normal file
1
keyboards/ep/96/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for ep96
|
15
keyboards/ep/96/readme.md
Normal file
15
keyboards/ep/96/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# ep96
|
||||
|
||||

|
||||
|
||||
A simple 96 key keyboard
|
||||
|
||||
Keyboard Maintainer: Keyboard Maintainer: [Elliot Powell](https://github.com/e11i0t23), [/u/e11i0t23](https://reddit.com/u/e11i0t23)
|
||||
Hardware Supported: EP96 PCB
|
||||
Hardware Availability: Possible availability upon request
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make ep/96: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).
|
81
keyboards/ep/96/rules.mk
Normal file
81
keyboards/ep/96/rules.mk
Normal file
@@ -0,0 +1,81 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# 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
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
@@ -85,17 +85,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define RGBW 1
|
||||
|
||||
/* "debounce" is measured in keyboard scans. Some users reported
|
||||
* needing values as high as 15, which was at the time around 50ms.
|
||||
/*
|
||||
* The debounce filtering reports a key/switch change directly,
|
||||
* without any extra delay. After that the debounce logic will filter
|
||||
* all further changes, until the key/switch reports the same state for
|
||||
* the given count of scans.
|
||||
* So a perfect switch will get a short debounce period and
|
||||
* a bad key will get a much longer debounce period.
|
||||
* The result is an adaptive debouncing period for each switch.
|
||||
*
|
||||
* If you don't define it here, the matrix code will default to
|
||||
* 5, which is now closer to 10ms, but still plenty according to
|
||||
* manufacturer specs.
|
||||
*
|
||||
* Default is quite high, because of reports with some production
|
||||
* runs seeming to need it. This may change when configuration for
|
||||
* this is more directly exposed.
|
||||
*/
|
||||
#define DEBOUNCE 15
|
||||
#define DEBOUNCE 10
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 500
|
||||
|
||||
|
@@ -269,6 +269,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
};
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
/*{row | col << 4}
|
||||
|
@@ -1,6 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
|
1
keyboards/ergodox_ez/keymaps/default_glow/keymap.c
Normal file
1
keyboards/ergodox_ez/keymaps/default_glow/keymap.c
Normal file
@@ -0,0 +1 @@
|
||||
// Placeholder. See ../default/keymap.c for details
|
4
keyboards/ergodox_ez/keymaps/default_glow/rules.mk
Normal file
4
keyboards/ergodox_ez/keymaps/default_glow/rules.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = yes # enable later
|
||||
|
||||
SRC += ../default/keymap.c
|
@@ -57,6 +57,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
/*
|
||||
* matrix state(1:on, 0:off)
|
||||
* contains the raw values without debounce filtering of the last read cycle.
|
||||
*/
|
||||
static matrix_row_t raw_matrix[MATRIX_ROWS];
|
||||
|
||||
// Debouncing: store for each key the number of scans until it's eligible to
|
||||
// change. When scanning the matrix, ignore any changes in keys that have
|
||||
@@ -118,6 +123,7 @@ void matrix_init(void)
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
raw_matrix[i] = 0;
|
||||
for (uint8_t j=0; j < MATRIX_COLS; ++j) {
|
||||
debounce_matrix[i * MATRIX_COLS + j] = 0;
|
||||
}
|
||||
@@ -151,26 +157,30 @@ void matrix_power_up(void) {
|
||||
|
||||
// Returns a matrix_row_t whose bits are set if the corresponding key should be
|
||||
// eligible to change in this scan.
|
||||
matrix_row_t debounce_mask(uint8_t row) {
|
||||
matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) {
|
||||
matrix_row_t result = 0;
|
||||
for (uint8_t j=0; j < MATRIX_COLS; ++j) {
|
||||
if (debounce_matrix[row * MATRIX_COLS + j]) {
|
||||
--debounce_matrix[row * MATRIX_COLS + j];
|
||||
matrix_row_t change = rawcols ^ raw_matrix[row];
|
||||
raw_matrix[row] = rawcols;
|
||||
for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
|
||||
if (debounce_matrix[row * MATRIX_COLS + i]) {
|
||||
--debounce_matrix[row * MATRIX_COLS + i];
|
||||
} else {
|
||||
result |= (1 << j);
|
||||
result |= (1 << i);
|
||||
}
|
||||
if (change & (1 << i)) {
|
||||
debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Report changed keys in the given row. Resets the debounce countdowns
|
||||
// corresponding to each set bit in 'change' to DEBOUNCE.
|
||||
void debounce_report(matrix_row_t change, uint8_t row) {
|
||||
for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
|
||||
if (change & (1 << i)) {
|
||||
debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
|
||||
}
|
||||
}
|
||||
matrix_row_t debounce_read_cols(uint8_t row) {
|
||||
// Read the row without debouncing filtering and store it for later usage.
|
||||
matrix_row_t cols = read_cols(row);
|
||||
// Get the Debounce mask.
|
||||
matrix_row_t mask = debounce_mask(cols, row);
|
||||
// debounce the row and return the result.
|
||||
return (cols & mask) | (matrix[row] & ~mask);;
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
@@ -214,15 +224,12 @@ uint8_t matrix_scan(void)
|
||||
select_row(i + MATRIX_ROWS_PER_SIDE);
|
||||
// we don't need a 30us delay anymore, because selecting a
|
||||
// left-hand row requires more than 30us for i2c.
|
||||
matrix_row_t mask = debounce_mask(i);
|
||||
matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask);
|
||||
debounce_report(cols ^ matrix[i], i);
|
||||
matrix[i] = cols;
|
||||
|
||||
// grab cols from left hand
|
||||
matrix[i] = debounce_read_cols(i);
|
||||
// grab cols from right hand
|
||||
mask = debounce_mask(i + MATRIX_ROWS_PER_SIDE);
|
||||
cols = (read_cols(i + MATRIX_ROWS_PER_SIDE) & mask) | (matrix[i + MATRIX_ROWS_PER_SIDE] & ~mask);
|
||||
debounce_report(cols ^ matrix[i + MATRIX_ROWS_PER_SIDE], i + MATRIX_ROWS_PER_SIDE);
|
||||
matrix[i + MATRIX_ROWS_PER_SIDE] = cols;
|
||||
matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE);
|
||||
|
||||
unselect_rows();
|
||||
}
|
||||
|
||||
@@ -379,7 +386,7 @@ static void select_row(uint8_t row)
|
||||
break;
|
||||
case 11:
|
||||
DDRD |= (1<<2);
|
||||
PORTD &= ~(1<<3);
|
||||
PORTD &= ~(1<<2);
|
||||
break;
|
||||
case 12:
|
||||
DDRD |= (1<<3);
|
||||
@@ -392,4 +399,3 @@ static void select_row(uint8_t row)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -15,8 +15,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# # project specific files
|
||||
SRC = matrix.c \
|
||||
i2c_master.c
|
||||
SRC += matrix.c
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
@@ -85,4 +84,9 @@ API_SYSEX_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGB_MATRIX_ENABLE = no # enable later
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), no)
|
||||
SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
|
||||
LAYOUTS = ergodox
|
||||
|
88
keyboards/espectro/keymaps/iso/keymap.c
Executable file
88
keyboards/espectro/keymaps/iso/keymap.c
Executable file
@@ -0,0 +1,88 @@
|
||||
/* Copyright 2018 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define _BL 0 //Base layer
|
||||
#define _FN1 1 //Function layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BL
|
||||
____________________________________________________________________________________________________________________________________________________________________________
|
||||
| | | | | | | | | | | | | | | | | | | |
|
||||
| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE | P SCN | HOME | END | P UP | P DOWN |
|
||||
|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|
|
||||
| ` | | | | | | | | | | | | | BACK | NUM | | | |
|
||||
| ¬ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | SPACE | LOCK | / | * | - |
|
||||
|________|________|________|________|________|________|________|________|________|________|________|________|________|_________________|________|________|________|________|
|
||||
| | | | | | | | | | | | [ | ] | | | | | |
|
||||
| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | 7 | 8 | 9 | |
|
||||
|____________|________|________|________|________|________|________|________|________|________|________|________|________|__ ENTER |________|________|________| + |
|
||||
| | | | | | | | | | | ; | ' | # | | | | | |
|
||||
| CAPS LOCK | A | S | D | F | G | H | J | K | L | : | @ | ~ | | 4 | 5 | 6 | |
|
||||
|______________|________|________|________|________|________|________|________|________|________|________|________|________|___________|________|________|________|________|
|
||||
| | \ | | | | | | | | , | . | / | | | | | | |
|
||||
| SHIFT | | | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | 1 | 2 | 3 | |
|
||||
|__________|_______|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________| ENTER |
|
||||
| | | | | | | MO | | | | | | |
|
||||
| CTRL | LGUI | L ALT | SPACE | R ALT | R CTRL | _FN | LEFT | DOWN | RIGHT | 0 | . | |
|
||||
|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________|
|
||||
*/
|
||||
|
||||
[_BL] = LAYOUT_split_shift_and_bs(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN,
|
||||
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_NO, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
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_NUHS, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
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_NO, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT, KC_NO
|
||||
),
|
||||
|
||||
/* FN_1
|
||||
____________________________________________________________________________________________________________________________________________________________________________
|
||||
| | | | | | | | | | | | | | | VOL | VOL | NEXT | | |
|
||||
| RESET | | | | | | | | | | | | | MUTE | DOWN | UP | TRACK | HOME | END |
|
||||
|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|
|
||||
| | RGB | RGB | RGB | RGB | RGB | RGB | RGB | RGB | | | | | | | | | |
|
||||
| | TOGGLE | MODE |INCREASE|DECREASE| HUE | HUE | SAT | | | | | | DELETE | | | | |
|
||||
|________|________|________|________|________|INCREASE|DECREASE|INCREASE|DECREASE|________|________|________|________|_________________|________|________|________|________|
|
||||
| | BACK | BACK | | | | | | | | | | | | | | | |
|
||||
| | LIGHT | LIGHT | | | | | | | | | | | | | | | |
|
||||
|____________| TOGGLE |INCREASE|DECREASE|________|________|________|________|________|________|________|________|________|__ |________|________|________| |
|
||||
| | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | |
|
||||
|______________|________|________|________|________|________|________|________|________|________|________|________|________|___________|________|________|________|________|
|
||||
| | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | |
|
||||
|__________|_______|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________| |
|
||||
| | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | |
|
||||
|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________|
|
||||
*/
|
||||
|
||||
[_FN1] = LAYOUT_split_shift_and_bs(
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_HOME, KC_END,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______,
|
||||
_______, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
@@ -1,5 +1,10 @@
|
||||
/*
|
||||
* WARNING: be careful changing this code, it is very timing dependent
|
||||
*
|
||||
* 2018-10-28 checked
|
||||
* avr-gcc 4.9.2
|
||||
* avr-gcc 5.4.0
|
||||
* avr-gcc 7.3.0
|
||||
*/
|
||||
|
||||
#ifndef F_CPU
|
||||
@@ -14,10 +19,60 @@
|
||||
#include "serial.h"
|
||||
//#include <pro_micro.h>
|
||||
|
||||
#ifdef USE_SERIAL
|
||||
#ifdef SOFT_SERIAL_PIN
|
||||
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
|
||||
#ifdef __AVR_ATmega32U4__
|
||||
// if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
|
||||
#ifdef USE_I2C
|
||||
#if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
|
||||
#error Using ATmega32U4 I2C, so can not use PD0, PD1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
|
||||
#define SERIAL_PIN_DDR DDRD
|
||||
#define SERIAL_PIN_PORT PORTD
|
||||
#define SERIAL_PIN_INPUT PIND
|
||||
#if SOFT_SERIAL_PIN == D0
|
||||
#define SERIAL_PIN_MASK _BV(PD0)
|
||||
#define EIMSK_BIT _BV(INT0)
|
||||
#define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
|
||||
#define SERIAL_PIN_INTERRUPT INT0_vect
|
||||
#elif SOFT_SERIAL_PIN == D1
|
||||
#define SERIAL_PIN_MASK _BV(PD1)
|
||||
#define EIMSK_BIT _BV(INT1)
|
||||
#define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
|
||||
#define SERIAL_PIN_INTERRUPT INT1_vect
|
||||
#elif SOFT_SERIAL_PIN == D2
|
||||
#define SERIAL_PIN_MASK _BV(PD2)
|
||||
#define EIMSK_BIT _BV(INT2)
|
||||
#define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
|
||||
#define SERIAL_PIN_INTERRUPT INT2_vect
|
||||
#elif SOFT_SERIAL_PIN == D3
|
||||
#define SERIAL_PIN_MASK _BV(PD3)
|
||||
#define EIMSK_BIT _BV(INT3)
|
||||
#define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
|
||||
#define SERIAL_PIN_INTERRUPT INT3_vect
|
||||
#endif
|
||||
#elif SOFT_SERIAL_PIN == E6
|
||||
#define SERIAL_PIN_DDR DDRE
|
||||
#define SERIAL_PIN_PORT PORTE
|
||||
#define SERIAL_PIN_INPUT PINE
|
||||
#define SERIAL_PIN_MASK _BV(PE6)
|
||||
#define EIMSK_BIT _BV(INT6)
|
||||
#define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||
#define SERIAL_PIN_INTERRUPT INT6_vect
|
||||
#else
|
||||
#error invalid SOFT_SERIAL_PIN value
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error serial.c now support ATmega32U4 only
|
||||
#endif
|
||||
|
||||
//////////////// for backward compatibility ////////////////////////////////
|
||||
#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
|
||||
/* --- USE OLD API (compatible with let's split serial.c) */
|
||||
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
|
||||
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||
#endif
|
||||
@@ -42,56 +97,118 @@ SSTD_t transactions[] = {
|
||||
};
|
||||
|
||||
void serial_master_init(void)
|
||||
{ soft_serial_initiator_init(transactions); }
|
||||
{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
|
||||
|
||||
void serial_slave_init(void)
|
||||
{ soft_serial_target_init(transactions); }
|
||||
{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
|
||||
|
||||
// 0 => no error
|
||||
// 1 => slave did not respond
|
||||
// 2 => checksum error
|
||||
int serial_update_buffers()
|
||||
{ return soft_serial_transaction(); }
|
||||
{
|
||||
int result;
|
||||
result = soft_serial_transaction();
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // Simple API (OLD API, compatible with let's split serial.c)
|
||||
#endif // end of OLD API (compatible with let's split serial.c)
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define ALWAYS_INLINE __attribute__((always_inline))
|
||||
#define NO_INLINE __attribute__((noinline))
|
||||
#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
|
||||
|
||||
// Serial pulse period in microseconds.
|
||||
#define TID_SEND_ADJUST 14
|
||||
// parity check
|
||||
#define ODD_PARITY 1
|
||||
#define EVEN_PARITY 0
|
||||
#define PARITY EVEN_PARITY
|
||||
|
||||
#define SELECT_SERIAL_SPEED 1
|
||||
#if SELECT_SERIAL_SPEED == 0
|
||||
#ifdef SERIAL_DELAY
|
||||
// custom setup in config.h
|
||||
// #define TID_SEND_ADJUST 2
|
||||
// #define SERIAL_DELAY 6 // micro sec
|
||||
// #define READ_WRITE_START_ADJUST 30 // cycles
|
||||
// #define READ_WRITE_WIDTH_ADJUST 8 // cycles
|
||||
#else
|
||||
// ============ Standard setups ============
|
||||
|
||||
#ifndef SELECT_SOFT_SERIAL_SPEED
|
||||
#define SELECT_SOFT_SERIAL_SPEED 1
|
||||
// 0: about 189kbps
|
||||
// 1: about 137kbps (default)
|
||||
// 2: about 75kbps
|
||||
// 3: about 39kbps
|
||||
// 4: about 26kbps
|
||||
// 5: about 20kbps
|
||||
#endif
|
||||
|
||||
#if __GNUC__ < 6
|
||||
#define TID_SEND_ADJUST 14
|
||||
#else
|
||||
#define TID_SEND_ADJUST 2
|
||||
#endif
|
||||
|
||||
#if SELECT_SOFT_SERIAL_SPEED == 0
|
||||
// Very High speed
|
||||
#define SERIAL_DELAY 4 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 33 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#elif SELECT_SERIAL_SPEED == 1
|
||||
#if __GNUC__ < 6
|
||||
#define READ_WRITE_START_ADJUST 33 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#else
|
||||
#define READ_WRITE_START_ADJUST 34 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||
#endif
|
||||
#elif SELECT_SOFT_SERIAL_SPEED == 1
|
||||
// High speed
|
||||
#define SERIAL_DELAY 6 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#elif SELECT_SERIAL_SPEED == 2
|
||||
#if __GNUC__ < 6
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#else
|
||||
#define READ_WRITE_START_ADJUST 33 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||
#endif
|
||||
#elif SELECT_SOFT_SERIAL_SPEED == 2
|
||||
// Middle speed
|
||||
#define SERIAL_DELAY 12 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#elif SELECT_SERIAL_SPEED == 3
|
||||
#if __GNUC__ < 6
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#else
|
||||
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||
#endif
|
||||
#elif SELECT_SOFT_SERIAL_SPEED == 3
|
||||
// Low speed
|
||||
#define SERIAL_DELAY 24 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#elif SELECT_SERIAL_SPEED == 4
|
||||
#if __GNUC__ < 6
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#else
|
||||
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||
#endif
|
||||
#elif SELECT_SOFT_SERIAL_SPEED == 4
|
||||
// Very Low speed
|
||||
#define SERIAL_DELAY 50 // micro sec
|
||||
#define SERIAL_DELAY 36 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#if __GNUC__ < 6
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#else
|
||||
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||
#endif
|
||||
#elif SELECT_SOFT_SERIAL_SPEED == 5
|
||||
// Ultra Low speed
|
||||
#define SERIAL_DELAY 48 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#if __GNUC__ < 6
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#else
|
||||
#define READ_WRITE_WIDTH_ADJUST 7 // cycles
|
||||
#endif
|
||||
#else
|
||||
#error Illegal Serial Speed
|
||||
#endif
|
||||
|
||||
#error invalid SELECT_SOFT_SERIAL_SPEED value
|
||||
#endif /* SELECT_SOFT_SERIAL_SPEED */
|
||||
#endif /* SERIAL_DELAY */
|
||||
|
||||
#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
|
||||
#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
|
||||
@@ -105,17 +222,21 @@ int serial_update_buffers()
|
||||
#endif
|
||||
|
||||
static SSTD_t *Transaction_table = NULL;
|
||||
static uint8_t Transaction_table_size = 0;
|
||||
|
||||
inline static void serial_delay(void) ALWAYS_INLINE;
|
||||
inline static
|
||||
void serial_delay(void) {
|
||||
_delay_us(SERIAL_DELAY);
|
||||
}
|
||||
|
||||
inline static void serial_delay_half1(void) ALWAYS_INLINE;
|
||||
inline static
|
||||
void serial_delay_half1(void) {
|
||||
_delay_us(SERIAL_DELAY_HALF1);
|
||||
}
|
||||
|
||||
inline static void serial_delay_half2(void) ALWAYS_INLINE;
|
||||
inline static
|
||||
void serial_delay_half2(void) {
|
||||
_delay_us(SERIAL_DELAY_HALF2);
|
||||
@@ -135,6 +256,7 @@ void serial_input_with_pullup(void) {
|
||||
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
inline static uint8_t serial_read_pin(void) ALWAYS_INLINE;
|
||||
inline static
|
||||
uint8_t serial_read_pin(void) {
|
||||
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
|
||||
@@ -152,30 +274,28 @@ void serial_high(void) {
|
||||
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
void soft_serial_initiator_init(SSTD_t *sstd_table)
|
||||
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size)
|
||||
{
|
||||
Transaction_table = sstd_table;
|
||||
Transaction_table_size = (uint8_t)sstd_table_size;
|
||||
serial_output();
|
||||
serial_high();
|
||||
}
|
||||
|
||||
void soft_serial_target_init(SSTD_t *sstd_table)
|
||||
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size)
|
||||
{
|
||||
Transaction_table = sstd_table;
|
||||
Transaction_table_size = (uint8_t)sstd_table_size;
|
||||
serial_input_with_pullup();
|
||||
|
||||
#if SERIAL_PIN_MASK == _BV(PD0)
|
||||
// Enable INT0
|
||||
EIMSK |= _BV(INT0);
|
||||
// Trigger on falling edge of INT0
|
||||
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
||||
#elif SERIAL_PIN_MASK == _BV(PD2)
|
||||
// Enable INT2
|
||||
EIMSK |= _BV(INT2);
|
||||
// Trigger on falling edge of INT2
|
||||
EICRA &= ~(_BV(ISC20) | _BV(ISC21));
|
||||
// Enable INT0-INT3,INT6
|
||||
EIMSK |= EIMSK_BIT;
|
||||
#if SERIAL_PIN_MASK == _BV(PE6)
|
||||
// Trigger on falling edge of INT6
|
||||
EICRB &= EICRx_BIT;
|
||||
#else
|
||||
#error unknown SERIAL_PIN_MASK value
|
||||
// Trigger on falling edge of INT0-INT3
|
||||
EICRA &= EICRx_BIT;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -191,7 +311,7 @@ void sync_recv(void) {
|
||||
}
|
||||
|
||||
// Used by the reciver to send a synchronization signal to the sender.
|
||||
static void sync_send(void)NO_INLINE;
|
||||
static void sync_send(void) NO_INLINE;
|
||||
static
|
||||
void sync_send(void) {
|
||||
serial_low();
|
||||
@@ -205,12 +325,12 @@ static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
|
||||
uint8_t byte, i, p, pb;
|
||||
|
||||
_delay_sub_us(READ_WRITE_START_ADJUST);
|
||||
for( i = 0, byte = 0, p = 0; i < bit; i++ ) {
|
||||
for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) {
|
||||
serial_delay_half1(); // read the middle of pulses
|
||||
if( serial_read_pin() ) {
|
||||
byte = (byte << 1) | 1; p ^= 1;
|
||||
byte = (byte << 1) | 1; p ^= 1;
|
||||
} else {
|
||||
byte = (byte << 1) | 0; p ^= 0;
|
||||
byte = (byte << 1) | 0; p ^= 0;
|
||||
}
|
||||
_delay_sub_us(READ_WRITE_WIDTH_ADJUST);
|
||||
serial_delay_half2();
|
||||
@@ -230,13 +350,13 @@ static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
|
||||
void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE;
|
||||
void serial_write_chunk(uint8_t data, uint8_t bit) {
|
||||
uint8_t b, p;
|
||||
for( p = 0, b = 1<<(bit-1); b ; b >>= 1) {
|
||||
if(data & b) {
|
||||
serial_high(); p ^= 1;
|
||||
} else {
|
||||
serial_low(); p ^= 0;
|
||||
}
|
||||
serial_delay();
|
||||
for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) {
|
||||
if(data & b) {
|
||||
serial_high(); p ^= 1;
|
||||
} else {
|
||||
serial_low(); p ^= 0;
|
||||
}
|
||||
serial_delay();
|
||||
}
|
||||
/* send parity bit */
|
||||
if(p & 1) { serial_high(); }
|
||||
@@ -288,6 +408,13 @@ void change_reciver2sender(void) {
|
||||
serial_delay_half1(); //4
|
||||
}
|
||||
|
||||
static inline uint8_t nibble_bits_count(uint8_t bits)
|
||||
{
|
||||
bits = (bits & 0x5) + (bits >> 1 & 0x5);
|
||||
bits = (bits & 0x3) + (bits >> 2 & 0x3);
|
||||
return bits;
|
||||
}
|
||||
|
||||
// interrupt handle to be used by the target device
|
||||
ISR(SERIAL_PIN_INTERRUPT) {
|
||||
|
||||
@@ -297,12 +424,15 @@ ISR(SERIAL_PIN_INTERRUPT) {
|
||||
SSTD_t *trans = Transaction_table;
|
||||
#else
|
||||
// recive transaction table index
|
||||
uint8_t tid;
|
||||
uint8_t tid, bits;
|
||||
uint8_t pecount = 0;
|
||||
sync_recv();
|
||||
tid = serial_read_chunk(&pecount,4);
|
||||
if(pecount> 0)
|
||||
bits = serial_read_chunk(&pecount,7);
|
||||
tid = bits>>3;
|
||||
bits = (bits&7) != nibble_bits_count(tid);
|
||||
if( bits || pecount> 0 || tid > Transaction_table_size ) {
|
||||
return;
|
||||
}
|
||||
serial_delay_half1();
|
||||
|
||||
serial_high(); // response step1 low->high
|
||||
@@ -315,17 +445,17 @@ ISR(SERIAL_PIN_INTERRUPT) {
|
||||
// target send phase
|
||||
if( trans->target2initiator_buffer_size > 0 )
|
||||
serial_send_packet((uint8_t *)trans->target2initiator_buffer,
|
||||
trans->target2initiator_buffer_size);
|
||||
trans->target2initiator_buffer_size);
|
||||
// target switch to input
|
||||
change_sender2reciver();
|
||||
|
||||
// target recive phase
|
||||
if( trans->initiator2target_buffer_size > 0 ) {
|
||||
if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer,
|
||||
trans->initiator2target_buffer_size) ) {
|
||||
*trans->status = TRANSACTION_ACCEPTED;
|
||||
trans->initiator2target_buffer_size) ) {
|
||||
*trans->status = TRANSACTION_ACCEPTED;
|
||||
} else {
|
||||
*trans->status = TRANSACTION_DATA_ERROR;
|
||||
*trans->status = TRANSACTION_DATA_ERROR;
|
||||
}
|
||||
} else {
|
||||
*trans->status = TRANSACTION_ACCEPTED;
|
||||
@@ -349,6 +479,8 @@ int soft_serial_transaction(void) {
|
||||
SSTD_t *trans = Transaction_table;
|
||||
#else
|
||||
int soft_serial_transaction(int sstd_index) {
|
||||
if( sstd_index > Transaction_table_size )
|
||||
return TRANSACTION_TYPE_ERROR;
|
||||
SSTD_t *trans = &Transaction_table[sstd_index];
|
||||
#endif
|
||||
cli();
|
||||
@@ -375,9 +507,10 @@ int soft_serial_transaction(int sstd_index) {
|
||||
|
||||
#else
|
||||
// send transaction table index
|
||||
int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index));
|
||||
sync_send();
|
||||
_delay_sub_us(TID_SEND_ADJUST);
|
||||
serial_write_chunk(sstd_index, 4);
|
||||
serial_write_chunk(tid, 7);
|
||||
serial_delay_half1();
|
||||
|
||||
// wait for the target response (step1 low->high)
|
||||
@@ -389,12 +522,12 @@ int soft_serial_transaction(int sstd_index) {
|
||||
// check if the target is present (step2 high->low)
|
||||
for( int i = 0; serial_read_pin(); i++ ) {
|
||||
if (i > SLAVE_INT_ACK_WIDTH + 1) {
|
||||
// slave failed to pull the line low, assume not present
|
||||
serial_output();
|
||||
serial_high();
|
||||
*trans->status = TRANSACTION_NO_RESPONSE;
|
||||
sei();
|
||||
return TRANSACTION_NO_RESPONSE;
|
||||
// slave failed to pull the line low, assume not present
|
||||
serial_output();
|
||||
serial_high();
|
||||
*trans->status = TRANSACTION_NO_RESPONSE;
|
||||
sei();
|
||||
return TRANSACTION_NO_RESPONSE;
|
||||
}
|
||||
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
|
||||
}
|
||||
@@ -404,12 +537,12 @@ int soft_serial_transaction(int sstd_index) {
|
||||
// if the target is present syncronize with it
|
||||
if( trans->target2initiator_buffer_size > 0 ) {
|
||||
if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer,
|
||||
trans->target2initiator_buffer_size) ) {
|
||||
serial_output();
|
||||
serial_high();
|
||||
*trans->status = TRANSACTION_DATA_ERROR;
|
||||
sei();
|
||||
return TRANSACTION_DATA_ERROR;
|
||||
trans->target2initiator_buffer_size) ) {
|
||||
serial_output();
|
||||
serial_high();
|
||||
*trans->status = TRANSACTION_DATA_ERROR;
|
||||
sei();
|
||||
return TRANSACTION_DATA_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +552,7 @@ int soft_serial_transaction(int sstd_index) {
|
||||
// initiator send phase
|
||||
if( trans->initiator2target_buffer_size > 0 ) {
|
||||
serial_send_packet((uint8_t *)trans->initiator2target_buffer,
|
||||
trans->initiator2target_buffer_size);
|
||||
trans->initiator2target_buffer_size);
|
||||
}
|
||||
|
||||
// always, release the line when not in use
|
||||
@@ -441,4 +574,17 @@ int soft_serial_get_and_clean_status(int sstd_index) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Helix serial.c history
|
||||
// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc)
|
||||
// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4)
|
||||
// (adjusted with avr-gcc 4.9.2)
|
||||
// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78)
|
||||
// (adjusted with avr-gcc 4.9.2)
|
||||
// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae)
|
||||
// (adjusted with avr-gcc 4.9.2)
|
||||
// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff)
|
||||
// (adjusted with avr-gcc 7.3.0)
|
||||
// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66)
|
||||
// (adjusted with avr-gcc 5.4.0, 7.3.0)
|
||||
|
@@ -4,40 +4,47 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
// /////////////////////////////////////////////////////////////////
|
||||
// Need Soft Serial defines in serial_config.h
|
||||
// Need Soft Serial defines in config.h
|
||||
// /////////////////////////////////////////////////////////////////
|
||||
// ex.
|
||||
// #define SERIAL_PIN_DDR DDRD
|
||||
// #define SERIAL_PIN_PORT PORTD
|
||||
// #define SERIAL_PIN_INPUT PIND
|
||||
// #define SERIAL_PIN_MASK _BV(PD?) ?=0,2
|
||||
// #define SERIAL_PIN_INTERRUPT INT?_vect ?=0,2
|
||||
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
|
||||
// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
|
||||
// // 1: about 137kbps (default)
|
||||
// // 2: about 75kbps
|
||||
// // 3: about 39kbps
|
||||
// // 4: about 26kbps
|
||||
// // 5: about 20kbps
|
||||
//
|
||||
// //// USE Simple API (OLD API, compatible with let's split serial.c)
|
||||
// //// USE OLD API (compatible with let's split serial.c)
|
||||
// ex.
|
||||
// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
// #define SERIAL_MASTER_BUFFER_LENGTH 1
|
||||
//
|
||||
// //// USE flexible API (using multi-type transaction function)
|
||||
// #define SERIAL_USE_MULTI_TRANSACTION
|
||||
// //// USE NEW API
|
||||
// //// USE simple API (using signle-type transaction function)
|
||||
// #define SERIAL_USE_SINGLE_TRANSACTION
|
||||
// //// USE flexible API (using multi-type transaction function)
|
||||
// #define SERIAL_USE_MULTI_TRANSACTION
|
||||
//
|
||||
// /////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
|
||||
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
|
||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||
#endif
|
||||
#if SERIAL_MASTER_BUFFER_LENGTH > 0
|
||||
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||
#endif
|
||||
//////////////// for backward compatibility ////////////////////////////////
|
||||
#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
|
||||
/* --- USE OLD API (compatible with let's split serial.c) */
|
||||
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
|
||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||
#endif
|
||||
#if SERIAL_MASTER_BUFFER_LENGTH > 0
|
||||
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||
#endif
|
||||
|
||||
void serial_master_init(void);
|
||||
void serial_slave_init(void);
|
||||
int serial_update_buffers(void);
|
||||
void serial_master_init(void);
|
||||
void serial_slave_init(void);
|
||||
int serial_update_buffers(void);
|
||||
|
||||
#endif // USE Simple API
|
||||
#endif // end of USE OLD API
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Soft Serial Transaction Descriptor
|
||||
typedef struct _SSTD_t {
|
||||
@@ -47,16 +54,18 @@ typedef struct _SSTD_t {
|
||||
uint8_t target2initiator_buffer_size;
|
||||
uint8_t *target2initiator_buffer;
|
||||
} SSTD_t;
|
||||
#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t))
|
||||
|
||||
// initiator is transaction start side
|
||||
void soft_serial_initiator_init(SSTD_t *sstd_table);
|
||||
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
|
||||
// target is interrupt accept side
|
||||
void soft_serial_target_init(SSTD_t *sstd_table);
|
||||
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
|
||||
|
||||
// initiator resullt
|
||||
#define TRANSACTION_END 0
|
||||
#define TRANSACTION_NO_RESPONSE 0x1
|
||||
#define TRANSACTION_DATA_ERROR 0x2
|
||||
#define TRANSACTION_TYPE_ERROR 0x4
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
int soft_serial_transaction(void);
|
||||
#else
|
||||
@@ -72,9 +81,9 @@ int soft_serial_transaction(int sstd_index);
|
||||
// target:
|
||||
// TRANSACTION_DATA_ERROR
|
||||
// or TRANSACTION_ACCEPTED
|
||||
#define TRANSACTION_ACCEPTED 0x4
|
||||
#define TRANSACTION_ACCEPTED 0x8
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
int soft_serial_get_and_clean_status(int sstd_index);
|
||||
#endif
|
||||
|
||||
#endif /* SOFT_SERIAL_H */
|
||||
#endif /* SOFT_SERIAL_H */
|
||||
|
@@ -2,13 +2,9 @@
|
||||
#define SOFT_SERIAL_CONFIG_H
|
||||
|
||||
/* Soft Serial defines */
|
||||
#define SERIAL_PIN_DDR DDRD
|
||||
#define SERIAL_PIN_PORT PORTD
|
||||
#define SERIAL_PIN_INPUT PIND
|
||||
#define SERIAL_PIN_MASK _BV(PD2)
|
||||
#define SERIAL_PIN_INTERRUPT INT2_vect
|
||||
#define SOFT_SERIAL_PIN D2
|
||||
|
||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
#define SERIAL_MASTER_BUFFER_LENGTH 1
|
||||
|
||||
#endif /* SOFT_SERIAL_CONFIG_H */
|
||||
#endif /* SOFT_SERIAL_CONFIG_H */
|
||||
|
@@ -0,0 +1 @@
|
||||
#include "108key_trackpoint.h"
|
23
keyboards/handwired/108key_trackpoint/108key_trackpoint.h
Normal file
23
keyboards/handwired/108key_trackpoint/108key_trackpoint.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K000, K002, K003, K004, K005, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K019, K020, K021, K022, \
|
||||
\
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K219, K220, K221, K222, \
|
||||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K319, K320, K321, \
|
||||
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K419, K420, K421, K422, \
|
||||
K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K513, K516, K519, K520, K521, \
|
||||
K600, K601, K603, K606, K610, K611, K613, K614, K615, K616, K617, K619, K621, K622, \
|
||||
K705, K706, K707 \
|
||||
) { \
|
||||
{ K000, KC_NO, K002, K003, K004, K005, KC_NO, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, K019, K020, K021, K022 }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215, K216, K217, KC_NO, K219, K220, K221, K222 }, \
|
||||
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, KC_NO, K319, K320, K321, KC_NO }, \
|
||||
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K419, K420, K421, K422 }, \
|
||||
{ KC_NO, K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, KC_NO, KC_NO, K516, KC_NO, KC_NO, K519, K520, K521, KC_NO }, \
|
||||
{ K600, K601, KC_NO, K603, KC_NO, KC_NO, K606, KC_NO, KC_NO, KC_NO, K610, K611, KC_NO, K613, K614, K615, K616, K617, KC_NO, K619, KC_NO, K621, K622 }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K705, K706, K707, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user