Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
64c957d907 | ||
|
9eb7b7919f | ||
|
103d904fab | ||
|
c5707708ed | ||
|
cd9262d7b2 | ||
|
6e984a8b5e | ||
|
2898699804 |
@ -2,15 +2,15 @@
|
||||
|
||||
There are three Unicode keymap definition methods available in QMK:
|
||||
|
||||
## UNICODE_ENABLE
|
||||
## `UNICODE_ENABLE`
|
||||
|
||||
Supports Unicode up to `0xFFFF`. The keycode function is `UC(n)` in the keymap file, where _n_ is a 4 digit hexadecimal number.
|
||||
Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap file, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
|
||||
|
||||
## UNICODEMAP_ENABLE
|
||||
## `UNICODEMAP_ENABLE`
|
||||
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(n)`, where _n_ is an array index into the mapping table.
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 1024 entries.
|
||||
|
||||
And you may want to have an enum to make reference easier. So you'd want to add something like this to your keymap:
|
||||
You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file:
|
||||
|
||||
```c
|
||||
enum unicode_names {
|
||||
@ -20,38 +20,37 @@ enum unicode_names {
|
||||
};
|
||||
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
[BANG] = 0x203D, // ‽
|
||||
[IRONY] = 0x2E2E, // ⸮
|
||||
[SNEK] = 0x1F40D, // 🐍
|
||||
[BANG] = 0x203D, // ‽
|
||||
[IRONY] = 0x2E2E, // ⸮
|
||||
[SNEK] = 0x1F40D, // 🐍
|
||||
};
|
||||
```
|
||||
|
||||
Make sure that the order for both matches.
|
||||
Then you can use `X(BANG)` etc. in your keymap.
|
||||
|
||||
## UCIS_ENABLE
|
||||
## `UCIS_ENABLE`
|
||||
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you may want to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once it's been called, you can type the mnemonic for your character, then hit Space or Enter to complete it or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode sequence inserted.
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once this function's been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted.
|
||||
|
||||
For instance, you would need to have a table like this in your keymap:
|
||||
For instance, you would define a table like this in your keymap file:
|
||||
|
||||
```c
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
|
||||
(
|
||||
UCIS_SYM("poop", 0x1f4a9),
|
||||
UCIS_SYM("rofl", 0x1f923),
|
||||
UCIS_SYM("kiss", 0x1f619)
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
|
||||
UCIS_SYM("poop", 0x1F4A9), // 💩
|
||||
UCIS_SYM("rofl", 0x1F923), // 🤣
|
||||
UCIS_SYM("kiss", 0x1F619) // 😙
|
||||
);
|
||||
```
|
||||
|
||||
You run the function, and then type "rofl" and hit enter, it should backspace remove "rofl" and input the `0x1f923` unicode.
|
||||
You call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and input the laughing emoji.
|
||||
|
||||
### Customization
|
||||
|
||||
There are several functions that you can add to your keymap to customize the functionality of this feature.
|
||||
There are several functions that you can define in your keymap to customize the functionality of this feature.
|
||||
|
||||
* `void qk_ucis_start_user(void)` - This runs when you run the "start" function, and can be used to provide feedback. By default, it types out a keyboard emoji.
|
||||
* `void qk_ucis_success(uint8_t symbol_index)` - This runs when the unicode input has matched something, and has completed. Default doesn't do anything.
|
||||
* `void qk_ucis_symbol_fallback (void)` - This runs if the input text doesn't match anything. The default function falls back to trying that input as a unicode code.
|
||||
* `void qk_ucis_start_user(void)` – This runs when you call the "start" function, and can be used to provide feedback. By default, it types out a keyboard emoji.
|
||||
* `void qk_ucis_success(uint8_t symbol_index)` – This runs when the input has matched something and has completed. By default, it doesn't do anything.
|
||||
* `void qk_ucis_symbol_fallback (void)` – This runs when the input doesn't match anything. By default, it falls back to trying that input as a Unicode code.
|
||||
|
||||
You can find the default implementations of these functions in [`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c).
|
||||
|
||||
@ -66,7 +65,7 @@ The following input modes are available:
|
||||
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
||||
By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode.
|
||||
|
||||
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports all possible code points (`0x10FFFF`).
|
||||
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
|
||||
|
||||
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
||||
|
||||
@ -77,7 +76,7 @@ The following input modes are available:
|
||||
|
||||
* **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues).
|
||||
|
||||
* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF`.
|
||||
* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF` (all currently assigned code points).
|
||||
|
||||
To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app.
|
||||
By default, this mode uses the right Alt key (`KC_RALT`), but this can be changed in the WinCompose settings and by defining [`UNICODE_WINC_KEY`](#input-key-configuration) with another keycode.
|
||||
|
@ -93,19 +93,17 @@ This enables MIDI sending and receiving with your keyboard. To enter MIDI send m
|
||||
|
||||
`UNICODE_ENABLE`
|
||||
|
||||
This allows you to send unicode symbols via `UC(<unicode>)` in your keymap. Only codes up to 0x7FFF are currently supported.
|
||||
This allows you to send Unicode characters using `UC(<code point>)` in your keymap. Code points up to `0x7FFF` are supported. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji.
|
||||
|
||||
`UNICODEMAP_ENABLE`
|
||||
|
||||
This allows sending unicode symbols using `X(<unicode>)` in your keymap. Codes
|
||||
up to 0xFFFFFFFF are supported, including emojis. You will need to maintain
|
||||
a separate mapping table in your keymap file.
|
||||
This allows you to send Unicode characters using `X(<map index>)` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported.
|
||||
|
||||
Known limitations:
|
||||
- Under Mac OS, only codes up to 0xFFFF are supported.
|
||||
- Under Linux ibus, only codes up to 0xFFFFF are supported (but anything important is still under this limit for now).
|
||||
`UCIS_ENABLE`
|
||||
|
||||
Characters out of range supported by the OS will be ignored.
|
||||
This allows you to send Unicode characters by inputting a mnemonic corresponding to the character you want to send. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported.
|
||||
|
||||
For further details, as well as limitations, see the [Unicode page](feature_unicode.md).
|
||||
|
||||
`BLUETOOTH_ENABLE`
|
||||
|
||||
@ -117,7 +115,7 @@ This allows you output audio on the C6 pin (needs abstracting). See the [audio p
|
||||
|
||||
`FAUXCLICKY_ENABLE`
|
||||
|
||||
Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as AUDIO_ENABLE.
|
||||
Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as `AUDIO_ENABLE`.
|
||||
|
||||
`VARIABLE_TRACE`
|
||||
|
||||
|
@ -454,7 +454,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [Unicode Support](feature_unicode.md)
|
||||
|
||||
|Key |Aliases| |
|
||||
|------------|-------|-------------------------------------------------|
|
||||
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|
||||
|`X(n)` | |Send Unicode character `n` via a different method|
|
||||
|Key |Description |
|
||||
|-------|---------------------------------------------------------------------------|
|
||||
|`UC(c)`|Send Unicode code point `c` (`UNICODE_ENABLE`) |
|
||||
|`X(i)` |Send Unicode code point at index `i` in `unicode_map` (`UNICODEMAP_ENABLE`)|
|
||||
|
@ -12,7 +12,7 @@ You can think of QMK as no different from any other computer program. It is star
|
||||
|
||||
The reason for this is the different platforms that QMK supports. The most common platform is `lufa`, which runs on AVR processors such at the atmega32u4. We also support `chibios` and `vusb`.
|
||||
|
||||
We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1019). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1060). This is [The Main Loop](#the-main-loop).
|
||||
We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069). This is [The Main Loop](#the-main-loop).
|
||||
|
||||
## The Main Loop
|
||||
|
||||
@ -22,7 +22,7 @@ This section of code is called "The Main Loop" because it's responsible for loop
|
||||
keyboard_task();
|
||||
```
|
||||
|
||||
This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/common/keyboard.c#L206), and it is responsible for detecting changes in the matrix and turning status LED's on and off.
|
||||
This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LED's on and off.
|
||||
|
||||
Within `keyboard_task()` you'll find code to handle:
|
||||
|
||||
@ -77,7 +77,7 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map
|
||||
|
||||
Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to.
|
||||
|
||||
You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document.
|
||||
You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document.
|
||||
|
||||
##### Keycode Assignment
|
||||
|
||||
@ -130,31 +130,33 @@ Comparing against our keymap we can see that the pressed key is KC_NLCK. From he
|
||||
|
||||
##### Process Record
|
||||
|
||||
The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in rule.mk or elsewhere, only a subset of the functions below will be included in final firmware.
|
||||
The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in `rules.mk` or elsewhere, only a subset of the functions below will be included in final firmware.
|
||||
|
||||
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/tmk_core/common/action.c#L172)
|
||||
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L193)
|
||||
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L213)
|
||||
* [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_tap_dance.c#L115)
|
||||
* [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_key_lock.c#L62)
|
||||
* [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_clicky.c#L44)
|
||||
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/card.c#L20)
|
||||
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
|
||||
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/fdd0f915271f79b104aa5d216566bcc3fd134e85/quantum/rgb_matrix.c#L139)
|
||||
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_midi.c#L81)
|
||||
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_audio.c#L19)
|
||||
* [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_steno.c#L160)
|
||||
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_music.c#L114)
|
||||
* [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_tap_dance.c#L136)
|
||||
* [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_leader.c#L38)
|
||||
* [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_combo.c#L115)
|
||||
* [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicode.c#L22)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_ucis.c#L91)
|
||||
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_printer.c#L77)
|
||||
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_auto_shift.c#L94)
|
||||
* [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicodemap.c#L47)
|
||||
* [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_terminal.c#L264)
|
||||
* [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/quantum.c#L287)
|
||||
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172)
|
||||
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206)
|
||||
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226)
|
||||
* [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119)
|
||||
* [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62)
|
||||
* [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79)
|
||||
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20)
|
||||
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
|
||||
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139)
|
||||
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81)
|
||||
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19)
|
||||
* [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160)
|
||||
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114)
|
||||
* [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141)
|
||||
* [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169)
|
||||
calls one of:
|
||||
* [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode.c#L20)
|
||||
* [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicodemap.c#L46)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_ucis.c#L95)
|
||||
* [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_leader.c#L51)
|
||||
* [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115)
|
||||
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77)
|
||||
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94)
|
||||
* [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264)
|
||||
* [Identify and process Quantum-specific keycodes](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291)
|
||||
|
||||
At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing.
|
||||
|
||||
|
35
keyboards/alpha/keymaps/vderm/README.md
Normal file
35
keyboards/alpha/keymaps/vderm/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Alpha 28-Key Keyboard Alternate Keymap
|
||||
Alternate keymap for [Alpha 28-key keyboard](https://github.com/qmk/qmk_firmware/tree/master/keyboards/alpha).
|
||||
|
||||
## How-to
|
||||
Assuming you've followed all the instructions from the original post, put my "keymap.c" file in "$qmk-firmware-folder$/keyboards/alpha/keymaps/vderm/" and then run your make command ("make alpha:vderm" while in $qmk-firmware-folder$ where this folder is what you've downloaded from the official github page) to compile the hex file to upload to your microcontroller. I've also uploaded my hex file.
|
||||
|
||||
## Description
|
||||
Instead of going up and down layers like in the original Alpha keyboard, I've made the bottom row keys all have alternate functions:
|
||||
+ Like in the original Alpha28 keymap, the 2U spacebar is a shift key when held down and space when tapped
|
||||
+ Z and M are Ctrl keys when held down or Z and M when tapped
|
||||
+ X and N are Alt keys
|
||||
+ C activates the function keys layer (arrows, page up/dn, esc, tab, etc.)
|
||||
+ V activates the characters and numbers layer
|
||||
+ C and V combined activated the F-keys layer (F1, F2, F3, etc.)
|
||||
+ The enter key is an enter key in the home layer, backspace in the function keys and characters/numbers layer and a delete in the F-keys layer
|
||||
+ While in the other layers, the bottom row acts like a "regular" bottom modified row: ctrl, alt, winkey
|
||||
|
||||
## Keymap
|
||||
![keymap](https://imgur.com/ZbDz0eL.jpg)
|
||||
|
||||
## Build Images
|
||||
Here is my keyboard.
|
||||
+ Switches: Aliaz Silent Switches (Tactile), PCB mount, 80g from [KBDfans](https://kbdfans.cn/collections/aliaz-switches/products/pre-orderaliaz-silent-switch-tactile?variant=2519899832333)
|
||||
+ PCB board: ordered from JLCPCB, in white
|
||||
+ Keycaps: ebay, can't find link :S
|
||||
+ Bottom plate: I cut a piece of canary wood that was laying around, needs to be varnished; I also need to actually screw the pcb to the wood instead of relying on double-sided tape
|
||||
|
||||
![vderm_alpha0](https://imgur.com/MjjoVtr.jpg)
|
||||
![vderm_alpha1](https://imgur.com/mIFu9WV.jpg)
|
||||
![vderm_alpha2](https://imgur.com/A70Iemw.jpg)
|
||||
![vderm_alpha3](https://imgur.com/eYljPWh.jpg)
|
||||
![vderm_alpha4](https://imgur.com/OhUKowj.jpg)
|
||||
|
||||
Good luck on your build!
|
||||
//vderm
|
1422
keyboards/alpha/keymaps/vderm/alpha_vderm.hex
Normal file
1422
keyboards/alpha/keymaps/vderm/alpha_vderm.hex
Normal file
File diff suppressed because it is too large
Load Diff
34
keyboards/alpha/keymaps/vderm/keymap.c
Normal file
34
keyboards/alpha/keymaps/vderm/keymap.c
Normal file
@ -0,0 +1,34 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define HOME 0
|
||||
#define FN 1
|
||||
#define FNCHAR 2
|
||||
#define FKEYS 3
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[HOME] = LAYOUT(
|
||||
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, KC_ENT,
|
||||
MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(1, KC_C), LT(2, KC_V), MT(MOD_LSFT, KC_SPC), MT(MOD_RGUI,KC_B), MT(MOD_RALT, KC_N), MT(MOD_RCTL, KC_M)),
|
||||
|
||||
[FN] = LAYOUT(
|
||||
KC_ESC, KC__MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO,
|
||||
KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC,
|
||||
KC_LCTL, KC_LALT, KC_TRNS, MO(3), MT(MOD_LSFT, KC_SPC), KC_RGUI, KC_RALT, KC_RCTL),
|
||||
|
||||
[FNCHAR] = LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_GRV,KC_NO,KC_MINS,KC_EQL,KC_BSLS,KC_LBRC,KC_RBRC,KC_SCLN,KC_QUOT,KC_BSPC,
|
||||
KC_LCTL, KC_LALT, MO(3), KC_TRNS, MT(MOD_LSFT, KC_SPC), KC_COMM, KC_DOT, KC_SLSH),
|
||||
|
||||
[FKEYS] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
KC_F11,KC_F12,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_DEL,
|
||||
KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, MT(MOD_LSFT, KC_SPC), KC_RGUI, KC_RALT, KC_RCTL),
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
245
keyboards/handwired/downbubble/config.h
Normal file
245
keyboards/handwired/downbubble/config.h
Normal file
@ -0,0 +1,245 @@
|
||||
/*
|
||||
Copyright 2018 Don Chiou
|
||||
|
||||
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 0x0000
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Flehrad
|
||||
#define PRODUCT downbubble
|
||||
#define DESCRIPTION An Ergonomic Centered Numpad Keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 20
|
||||
|
||||
/*
|
||||
* 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 { F1, F2, F3, F4, F5, F6 }
|
||||
#define MATRIX_COL_PINS { F7, C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2, D1, D0, B7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
// #define RGB_DI_PIN E2
|
||||
// #ifdef RGB_DI_PIN
|
||||
// #define RGBLED_NUM 16
|
||||
// #define RGBLIGHT_HUE_STEP 8
|
||||
// #define RGBLIGHT_SAT_STEP 8
|
||||
// #define RGBLIGHT_VAL_STEP 8
|
||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
// /*== all animations enable ==*/
|
||||
// #define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// #endif
|
||||
|
||||
/* 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
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
16
keyboards/handwired/downbubble/downbubble.c
Normal file
16
keyboards/handwired/downbubble/downbubble.c
Normal file
@ -0,0 +1,16 @@
|
||||
/* Copyright 2018 REPLACE_WITH_YOUR_NAME
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "downbubble.h"
|
111
keyboards/handwired/downbubble/downbubble.h
Normal file
111
keyboards/handwired/downbubble/downbubble.h
Normal file
@ -0,0 +1,111 @@
|
||||
/* Copyright 2018 REPLACE_WITH_YOUR_NAME
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_standard( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K418, \
|
||||
K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \
|
||||
{ K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_split_bs( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K418, \
|
||||
K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \
|
||||
{ K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_split_rshift( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K417, K418, \
|
||||
K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, K417, K418, KC_NO }, \
|
||||
{ K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_split_numpad( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, K317, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, K416, K418, \
|
||||
K50, K51, K52, K53, K54, K56, K57, K58, K59, K510, K512, K513, K514, K516, K517, K518, K519 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \
|
||||
{ K50, K51, K52, K53, K54, KC_NO, K56, K57, K58, K59, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_all( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, K317, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, K416, K417, K418, \
|
||||
K50, K51, K52, K53, K54, K56, K57, K58, K59, K510, K512, K513, K514, K516, K517, K518, K519 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, K417, K418, KC_NO }, \
|
||||
{ K50, K51, K52, K53, K54, KC_NO, K56, K57, K58, K59, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \
|
||||
}
|
559
keyboards/handwired/downbubble/info.json
Normal file
559
keyboards/handwired/downbubble/info.json
Normal file
File diff suppressed because it is too large
Load Diff
19
keyboards/handwired/downbubble/keymaps/default/config.h
Normal file
19
keyboards/handwired/downbubble/keymaps/default/config.h
Normal file
@ -0,0 +1,19 @@
|
||||
/* Copyright 2018 REPLACE_WITH_YOUR_NAME
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
103
keyboards/handwired/downbubble/keymaps/default/keymap.c
Normal file
103
keyboards/handwired/downbubble/keymaps/default/keymap.c
Normal file
@ -0,0 +1,103 @@
|
||||
/* Copyright 2018 REPLACE_WITH_YOUR_NAME
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include 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_standard(\
|
||||
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_NLCK, KC_HOME, KC_TRNS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, 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_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
LAYOUT_split_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_PSCR, KC_NLCK, KC_HOME, KC_TRNS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, 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_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
LAYOUT_split_rshift(\
|
||||
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_NLCK, KC_HOME, KC_TRNS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, 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_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
LAYOUT_split_numpad(\
|
||||
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_NLCK, KC_HOME, KC_TRNS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_TRNS, 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_P1, KC_P2, KC_P3, KC_PENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_TRNS, KC_PDOT, KC_TRNS, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
LAYOUT_all(\
|
||||
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_NLCK, KC_HOME, KC_TRNS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_TRNS, 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_P1, KC_P2, KC_P3, KC_PENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_TRNS, KC_PDOT, KC_TRNS, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
};
|
||||
|
||||
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/handwired/downbubble/keymaps/default/readme.md
Normal file
1
keyboards/handwired/downbubble/keymaps/default/readme.md
Normal file
@ -0,0 +1 @@
|
||||
# The default keymaps for downbubble
|
201
keyboards/handwired/downbubble/license
Normal file
201
keyboards/handwired/downbubble/license
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
15
keyboards/handwired/downbubble/readme.md
Normal file
15
keyboards/handwired/downbubble/readme.md
Normal file
@ -0,0 +1,15 @@
|
||||
# downbubble
|
||||
|
||||
Prototype hand-wired version of this keyboard - https://imgur.com/a/0KbX1JH
|
||||
|
||||
This is an ergonomic keyboard with a 5 degree rotation on keyboard halves, and a rotated numpad in the center for RH users.
|
||||
|
||||
Keyboard Maintainer: [Flehrad](https://github.com/flehrad)
|
||||
Hardware Supported: downbubble PCB, AT90USB1286 MCU, MX switches and MiniUSB connector
|
||||
Hardware Availability: The Board Podcast Slack
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make downbubble: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/handwired/downbubble/rules.mk
Normal file
81
keyboards/handwired/downbubble/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 = 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
|
||||
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)
|
@ -79,8 +79,6 @@ void matrix_init(void)
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
#define MATRIX_SCAN_DELAY 10 //Delay after setting a col to output (in us)
|
||||
|
||||
uint64_t mdebouncing = 0;
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
@ -89,9 +87,7 @@ uint8_t matrix_scan(void)
|
||||
uint8_t col;
|
||||
uint32_t scans[2]; //PA PB
|
||||
|
||||
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
||||
|
||||
//DBG_1_OFF; //Profiling scans
|
||||
if (timer_read64() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
||||
|
||||
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
||||
|
||||
@ -99,7 +95,7 @@ uint8_t matrix_scan(void)
|
||||
{
|
||||
PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output
|
||||
|
||||
CLK_delay_us(MATRIX_SCAN_DELAY); //Delay for output
|
||||
wait_us(1); //Delay for output
|
||||
|
||||
scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data
|
||||
scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data
|
||||
@ -132,11 +128,9 @@ uint8_t matrix_scan(void)
|
||||
else
|
||||
{
|
||||
//Begin or extend debounce on change
|
||||
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
||||
mdebouncing = timer_read64() + DEBOUNCING_DELAY;
|
||||
}
|
||||
|
||||
//DBG_1_ON; //Profiling scans
|
||||
|
||||
matrix_scan_quantum();
|
||||
|
||||
return 1;
|
||||
|
@ -79,8 +79,6 @@ void matrix_init(void)
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
#define MATRIX_SCAN_DELAY 10 //Delay after setting a col to output (in us)
|
||||
|
||||
uint64_t mdebouncing = 0;
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
@ -89,9 +87,7 @@ uint8_t matrix_scan(void)
|
||||
uint8_t col;
|
||||
uint32_t scans[2]; //PA PB
|
||||
|
||||
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
||||
|
||||
//DBG_1_OFF; //Profiling scans
|
||||
if (timer_read64() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
||||
|
||||
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
||||
|
||||
@ -99,7 +95,7 @@ uint8_t matrix_scan(void)
|
||||
{
|
||||
PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output
|
||||
|
||||
CLK_delay_us(MATRIX_SCAN_DELAY); //Delay for output
|
||||
wait_us(1); //Delay for output
|
||||
|
||||
scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data
|
||||
scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data
|
||||
@ -132,11 +128,9 @@ uint8_t matrix_scan(void)
|
||||
else
|
||||
{
|
||||
//Begin or extend debounce on change
|
||||
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
||||
mdebouncing = timer_read64() + DEBOUNCING_DELAY;
|
||||
}
|
||||
|
||||
//DBG_1_ON; //Profiling scans
|
||||
|
||||
matrix_scan_quantum();
|
||||
|
||||
return 1;
|
||||
|
87
keyboards/ymd96/keymaps/epx/keymap.c
Normal file
87
keyboards/ymd96/keymaps/epx/keymap.c
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
Copyright 2017 Andrew Novak <ndrw.nvk@gmail.com>
|
||||
Modified Copyright 2018 Elvis Pfutzenreuter <elvis.pfutzenreuter@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 LicensezZZ
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define _x_ KC_TRNS
|
||||
#define _DEFLT 0
|
||||
#define _AR 1
|
||||
#define _RAISE 2
|
||||
|
||||
#define KEYMAP KEYMAP_DEFAULT
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Layer 0, default layer
|
||||
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | || > | << | >> | vol+ | vol- | Bkspc |
|
||||
* | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | - |
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | \ | 7 | 8 | 9 | |
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Return | 4 | 5 | 6 | + |
|
||||
* | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | |
|
||||
* | Ctrl | Alt | Win | Space | Win | Fn | Alt | Ctrl | 0 | . | Enter |
|
||||
*
|
||||
* Layout is inspired on Model F.
|
||||
* Extra keys on top right, as well as some seldom-used keys, are media keys in default layer.
|
||||
* Num Lock toogles layer, so the numeric block works as a Model F navigation block in a Mac.
|
||||
* (Fn-Num Lock operates as conventional Num Lock in case the keyboard needs to be used with Windows or Linux.)
|
||||
* Caps Lock operates normally but it takes FN to work, the key is Ctrl by default, like in Model F.
|
||||
*/
|
||||
[_DEFLT] = KEYMAP(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_BSPC, \
|
||||
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, TO(_AR), 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_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||
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_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, KC_RGUI, KC_NO, MO(_RAISE), KC_RALT, KC_RCTL, KC_P0, KC_P0, KC_PDOT \
|
||||
),
|
||||
|
||||
/* Layer 1, Num Lock activated
|
||||
* ...
|
||||
* ...
|
||||
* ... | Home | Up | Pg Up | |
|
||||
* ... | Left | (no) | Right | + |
|
||||
* ... | End | Down | Pg Dn | |
|
||||
* ... | Ins | Del | Enter |
|
||||
*/
|
||||
[_AR] = KEYMAP(
|
||||
_x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \
|
||||
_x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, TO(_DEFLT), _x_, _x_, _x_, \
|
||||
_x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_HOME, KC_UP, KC_PGUP, _x_, \
|
||||
_x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_LEFT, KC_NO, KC_RGHT, _x_, \
|
||||
_x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_END, KC_DOWN, KC_PGDN, _x_, \
|
||||
_x_, _x_,_x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_INS, KC_INS, KC_DEL \
|
||||
),
|
||||
|
||||
/* Layer 2, raise layer
|
||||
* | | | | | | | | | | | | | | PrtSc |Pause|ScrLck| stop | mute | Del |
|
||||
* | | RGB Toggle | RGB Hue - | RGB Hue + | | | | | | | | | | Del |NumLck| | | |
|
||||
* | | RGB Mode + | RGB Satu- | RGB Satu+ | | | | | | | | | | | | | | |
|
||||
* | Caps Lck | RGB Mode - | RGB Brgt- | RGB Brgt+ | | | | | | | | | | | | | | |
|
||||
* | | | | | | | | | | | | | | | | |
|
||||
* | | | | | Win Menu | | | | | | |
|
||||
*/
|
||||
[_RAISE] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_PAUS, KC_SLCK, KC_MUTE, KC_MSTP, KC_DEL, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_NLCK, _______, _______, _______, \
|
||||
_______, RGB_TOG, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_CAPS, RGB_MOD, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, RGB_RMOD,RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______,_______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
@ -216,7 +216,7 @@ bool process_unicode_common(uint16_t keycode, keyrecord_t *record) {
|
||||
#if defined(UNICODE_ENABLE)
|
||||
return process_unicode(keycode, record);
|
||||
#elif defined(UNICODEMAP_ENABLE)
|
||||
return process_unicode_map(keycode, record);
|
||||
return process_unicodemap(keycode, record);
|
||||
#elif defined(UCIS_ENABLE)
|
||||
return process_ucis(keycode, record);
|
||||
#else
|
||||
|
@ -18,8 +18,7 @@
|
||||
#include "process_unicode_common.h"
|
||||
|
||||
__attribute__((weak))
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
};
|
||||
const uint32_t PROGMEM unicode_map[] = {};
|
||||
|
||||
void register_hex32(uint32_t hex) {
|
||||
bool onzerostart = true;
|
||||
@ -42,26 +41,26 @@ void register_hex32(uint32_t hex) {
|
||||
}
|
||||
|
||||
__attribute__((weak))
|
||||
void unicode_map_input_error() {}
|
||||
void unicodemap_input_error() {}
|
||||
|
||||
bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t input_mode = get_unicode_input_mode();
|
||||
if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
|
||||
const uint32_t* map = unicode_map;
|
||||
uint16_t index = keycode - QK_UNICODE_MAP;
|
||||
uint32_t code = pgm_read_dword(&map[index]);
|
||||
if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) {
|
||||
bool process_unicodemap(uint16_t keycode, keyrecord_t *record) {
|
||||
if ((keycode & QK_UNICODEMAP) == QK_UNICODEMAP && record->event.pressed) {
|
||||
uint16_t index = keycode - QK_UNICODEMAP;
|
||||
uint32_t code = pgm_read_dword(unicode_map + index);
|
||||
uint8_t input_mode = get_unicode_input_mode();
|
||||
|
||||
if (code > 0xFFFF && code <= 0x10FFFF && input_mode == UC_OSX) {
|
||||
// Convert to UTF-16 surrogate pair
|
||||
code -= 0x10000;
|
||||
uint32_t lo = code & 0x3ff;
|
||||
uint32_t hi = (code & 0xffc00) >> 10;
|
||||
uint32_t lo = code & 0x3FF, hi = (code & 0xFFC00) >> 10;
|
||||
|
||||
unicode_input_start();
|
||||
register_hex32(hi + 0xd800);
|
||||
register_hex32(lo + 0xdc00);
|
||||
register_hex32(hi + 0xD800);
|
||||
register_hex32(lo + 0xDC00);
|
||||
unicode_input_finish();
|
||||
} else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) {
|
||||
// when character is out of range supported by the OS
|
||||
unicode_map_input_error();
|
||||
} else if ((code > 0x10FFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) {
|
||||
// Character is out of range supported by the OS
|
||||
unicodemap_input_error();
|
||||
} else {
|
||||
unicode_input_start();
|
||||
register_hex32(code);
|
||||
|
@ -19,5 +19,5 @@
|
||||
#include "quantum.h"
|
||||
#include "process_unicode_common.h"
|
||||
|
||||
void unicode_map_input_error(void);
|
||||
bool process_unicode_map(uint16_t keycode, keyrecord_t *record);
|
||||
void unicodemap_input_error(void);
|
||||
bool process_unicodemap(uint16_t keycode, keyrecord_t *record);
|
||||
|
@ -86,8 +86,8 @@ enum quantum_keycodes {
|
||||
QK_UNICODE_MAX = 0xFFFF,
|
||||
#endif
|
||||
#ifdef UNICODEMAP_ENABLE
|
||||
QK_UNICODE_MAP = 0x8000,
|
||||
QK_UNICODE_MAP_MAX = 0x83FF,
|
||||
QK_UNICODEMAP = 0x8000,
|
||||
QK_UNICODEMAP_MAX = 0x83FF,
|
||||
#endif
|
||||
|
||||
// Loose keycodes - to be used directly
|
||||
@ -489,9 +489,8 @@ enum quantum_keycodes {
|
||||
#define SWIN(kc) SGUI(kc)
|
||||
#define LCA(kc) (QK_LCTL | QK_LALT | (kc))
|
||||
|
||||
#define MOD_HYPR 0xf
|
||||
#define MOD_MEH 0x7
|
||||
|
||||
#define MOD_HYPR 0xF
|
||||
#define MOD_MEH 0x7
|
||||
|
||||
// Aliases for shifted symbols
|
||||
// Each key has a 4-letter code, and some have longer aliases too.
|
||||
@ -601,7 +600,7 @@ enum quantum_keycodes {
|
||||
#define RGB_M_T RGB_MODE_RGBTEST
|
||||
|
||||
// L-ayer, T-ap - 256 keycode max, 16 layer max
|
||||
#define LT(layer, kc) (QK_LAYER_TAP | ((layer & 0xF) << 8) | ((kc) & 0xFF))
|
||||
#define LT(layer, kc) (QK_LAYER_TAP | (((layer) & 0xF) << 8) | ((kc) & 0xFF))
|
||||
|
||||
#define AG_SWAP MAGIC_SWAP_ALT_GUI
|
||||
#define AG_NORM MAGIC_UNSWAP_ALT_GUI
|
||||
@ -615,28 +614,28 @@ enum quantum_keycodes {
|
||||
// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own
|
||||
// keycode modeled after the old version, kept below for this.
|
||||
/* #define TO(layer, when) (QK_TO | (when << 0x4) | (layer & 0xFF)) */
|
||||
#define TO(layer) (QK_TO | (ON_PRESS << 0x4) | (layer & 0xFF))
|
||||
#define TO(layer) (QK_TO | (ON_PRESS << 0x4) | ((layer) & 0xFF))
|
||||
|
||||
// Momentary switch layer - 256 layer max
|
||||
#define MO(layer) (QK_MOMENTARY | (layer & 0xFF))
|
||||
#define MO(layer) (QK_MOMENTARY | ((layer) & 0xFF))
|
||||
|
||||
// Set default layer - 256 layer max
|
||||
#define DF(layer) (QK_DEF_LAYER | (layer & 0xFF))
|
||||
#define DF(layer) (QK_DEF_LAYER | ((layer) & 0xFF))
|
||||
|
||||
// Toggle to layer - 256 layer max
|
||||
#define TG(layer) (QK_TOGGLE_LAYER | (layer & 0xFF))
|
||||
#define TG(layer) (QK_TOGGLE_LAYER | ((layer) & 0xFF))
|
||||
|
||||
// One-shot layer - 256 layer max
|
||||
#define OSL(layer) (QK_ONE_SHOT_LAYER | (layer & 0xFF))
|
||||
#define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer) & 0xFF))
|
||||
|
||||
// L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max, left mods only
|
||||
#define LM(layer, mod) (QK_LAYER_MOD | ((layer & 0xF) << 4) | ((mod) & 0xF))
|
||||
#define LM(layer, mod) (QK_LAYER_MOD | (((layer) & 0xF) << 4) | ((mod) & 0xF))
|
||||
|
||||
// One-shot mod
|
||||
#define OSM(mod) (QK_ONE_SHOT_MOD | ((mod) & 0xFF))
|
||||
|
||||
// Layer tap-toggle
|
||||
#define TT(layer) (QK_LAYER_TAP_TOGGLE | (layer & 0xFF))
|
||||
#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer) & 0xFF))
|
||||
|
||||
// M-od, T-ap - 256 keycode max
|
||||
#define MT(mod, kc) (QK_MOD_TAP | (((mod) & 0x1F) << 8) | ((kc) & 0xFF))
|
||||
@ -679,15 +678,12 @@ enum quantum_keycodes {
|
||||
#define KC_MEH MEH(KC_NO)
|
||||
|
||||
#ifdef UNICODE_ENABLE
|
||||
// For sending unicode codes.
|
||||
// You may not send codes over 7FFF -- this supports most of UTF8.
|
||||
// To have a key that sends out Œ, go UC(0x0152)
|
||||
#define UNICODE(n) (QK_UNICODE | (n))
|
||||
#define UC(n) UNICODE(n)
|
||||
// Allows Unicode input up to 0x7FFF
|
||||
#define UC(c) (QK_UNICODE | (c))
|
||||
#endif
|
||||
|
||||
#ifdef UNICODEMAP_ENABLE
|
||||
#define X(n) (QK_UNICODE_MAP | (n))
|
||||
// Allows Unicode input up to 0x10FFFF, requires unicode_map
|
||||
#define X(i) (QK_UNICODEMAP | (i))
|
||||
#endif
|
||||
|
||||
#define UC_MOD UNICODE_MODE_FORWARD
|
||||
|
@ -9,7 +9,7 @@ void set_time(uint64_t tset)
|
||||
|
||||
void timer_init(void)
|
||||
{
|
||||
ms_clk = 0;
|
||||
timer_clear();
|
||||
}
|
||||
|
||||
uint16_t timer_read(void)
|
||||
@ -37,23 +37,7 @@ uint32_t timer_elapsed32(uint32_t tlast)
|
||||
return TIMER_DIFF_32(timer_read32(), tlast);
|
||||
}
|
||||
|
||||
uint32_t timer_elapsed64(uint32_t tlast)
|
||||
{
|
||||
uint64_t tnow = timer_read64();
|
||||
return (tnow >= tlast ? tnow - tlast : UINT64_MAX - tlast + tnow);
|
||||
}
|
||||
|
||||
void timer_clear(void)
|
||||
{
|
||||
ms_clk = 0;
|
||||
}
|
||||
|
||||
void wait_ms(uint64_t msec)
|
||||
{
|
||||
CLK_delay_ms(msec);
|
||||
}
|
||||
|
||||
void wait_us(uint16_t usec)
|
||||
{
|
||||
CLK_delay_us(usec);
|
||||
set_time(0);
|
||||
}
|
||||
|
@ -5,9 +5,9 @@
|
||||
# include <avr/pgmspace.h>
|
||||
#else
|
||||
# define PROGMEM
|
||||
# define pgm_read_byte(p) *((unsigned char*)p)
|
||||
# define pgm_read_word(p) *((uint16_t*)p)
|
||||
# define pgm_read_dword(p) *((uint32_t*)p)
|
||||
# define pgm_read_byte(p) *((unsigned char*)(p))
|
||||
# define pgm_read_word(p) *((uint16_t*)(p))
|
||||
# define pgm_read_dword(p) *((uint32_t*)(p))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -15,6 +15,10 @@ extern "C" {
|
||||
# include "ch.h"
|
||||
# define wait_ms(ms) chThdSleepMilliseconds(ms)
|
||||
# define wait_us(us) chThdSleepMicroseconds(us)
|
||||
#elif defined PROTOCOL_ARM_ATSAM
|
||||
# include "clks.h"
|
||||
# define wait_ms(ms) CLK_delay_ms(ms)
|
||||
# define wait_us(us) CLK_delay_us(us)
|
||||
#elif defined(__arm__)
|
||||
# include "wait_api.h"
|
||||
#else // Unit tests
|
||||
|
@ -21,8 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "samd51j18a.h"
|
||||
#include "md_bootloader.h"
|
||||
|
||||
#include "timer.h"
|
||||
#include "d51_util.h"
|
||||
#include "clks.h"
|
||||
#include "wait.h"
|
||||
#include "adc.h"
|
||||
#include "i2c_master.h"
|
||||
#include "spi.h"
|
||||
|
@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
volatile clk_t system_clks;
|
||||
volatile uint64_t ms_clk;
|
||||
|
||||
volatile uint8_t us_delay_done;
|
||||
uint32_t usec_delay_mult;
|
||||
#define USEC_DELAY_LOOP_CYCLES 3 //Sum of instruction cycles in us delay loop
|
||||
|
||||
const uint32_t sercom_apbbase[] = {(uint32_t)SERCOM0,(uint32_t)SERCOM1,(uint32_t)SERCOM2,(uint32_t)SERCOM3,(uint32_t)SERCOM4,(uint32_t)SERCOM5};
|
||||
const uint8_t sercom_pchan[] = {7, 8, 23, 24, 34, 35};
|
||||
@ -73,6 +73,9 @@ void CLK_oscctrl_init(void)
|
||||
|
||||
system_clks.freq_gclk[0] = system_clks.freq_dpll[0];
|
||||
|
||||
usec_delay_mult = system_clks.freq_gclk[0] / (USEC_DELAY_LOOP_CYCLES * 1000000);
|
||||
if (usec_delay_mult < 1) usec_delay_mult = 1; //Never allow a multiplier of zero
|
||||
|
||||
DBGC(DC_CLK_OSC_INIT_COMPLETE);
|
||||
}
|
||||
|
||||
@ -158,23 +161,11 @@ void TC4_Handler()
|
||||
}
|
||||
}
|
||||
|
||||
void TC5_Handler()
|
||||
{
|
||||
if (TC5->COUNT16.INTFLAG.bit.MC0)
|
||||
{
|
||||
TC5->COUNT16.INTFLAG.reg = TC_INTENCLR_MC0;
|
||||
us_delay_done = 1;
|
||||
TC5->COUNT16.CTRLA.bit.ENABLE = 0;
|
||||
while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t CLK_enable_timebase(void)
|
||||
{
|
||||
Gclk *pgclk = GCLK;
|
||||
Mclk *pmclk = MCLK;
|
||||
Tc *ptc4 = TC4;
|
||||
Tc *ptc5 = TC5;
|
||||
Tc *ptc0 = TC0;
|
||||
Evsys *pevsys = EVSYS;
|
||||
|
||||
@ -189,11 +180,6 @@ uint32_t CLK_enable_timebase(void)
|
||||
pgclk->PCHCTRL[TC4_GCLK_ID].bit.GEN = GEN_TC45;
|
||||
pgclk->PCHCTRL[TC4_GCLK_ID].bit.CHEN = 1;
|
||||
|
||||
//unmask TC5 sourcegclk2 to TC5
|
||||
pmclk->APBCMASK.bit.TC5_ = 1;
|
||||
pgclk->PCHCTRL[TC5_GCLK_ID].bit.GEN = GEN_TC45;
|
||||
pgclk->PCHCTRL[TC5_GCLK_ID].bit.CHEN = 1;
|
||||
|
||||
//configure TC4
|
||||
DBGC(DC_CLK_ENABLE_TIMEBASE_TC4_BEGIN);
|
||||
ptc4->COUNT16.CTRLA.bit.ENABLE = 0;
|
||||
@ -220,30 +206,6 @@ uint32_t CLK_enable_timebase(void)
|
||||
|
||||
DBGC(DC_CLK_ENABLE_TIMEBASE_TC4_COMPLETE);
|
||||
|
||||
//configure TC5
|
||||
DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_BEGIN);
|
||||
ptc5->COUNT16.CTRLA.bit.ENABLE = 0;
|
||||
while (ptc5->COUNT16.SYNCBUSY.bit.ENABLE) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_DISABLE); }
|
||||
ptc5->COUNT16.CTRLA.bit.SWRST = 1;
|
||||
while (ptc5->COUNT16.SYNCBUSY.bit.SWRST) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_SWRST_1); }
|
||||
while (ptc5->COUNT16.CTRLA.bit.SWRST) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_SWRST_2); }
|
||||
|
||||
//CTRLA defaults
|
||||
//CTRLB as default, counting up
|
||||
ptc5->COUNT16.CTRLBCLR.reg = 5;
|
||||
while (ptc5->COUNT16.SYNCBUSY.bit.CTRLB) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_CLTRB); }
|
||||
//ptc5->COUNT16.DBGCTRL.bit.DBGRUN = 1;
|
||||
|
||||
//wave mode
|
||||
ptc5->COUNT16.WAVE.bit.WAVEGEN = 1; //MFRQ match frequency mode, toggle each CC match
|
||||
//generate event for next stage
|
||||
ptc5->COUNT16.EVCTRL.bit.MCEO0 = 1;
|
||||
|
||||
NVIC_EnableIRQ(TC5_IRQn);
|
||||
ptc5->COUNT16.INTENSET.bit.MC0 = 1;
|
||||
|
||||
DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_COMPLETE);
|
||||
|
||||
//unmask TC0,1, sourcegclk2 to TC0,1
|
||||
pmclk->APBAMASK.bit.TC0_ = 1;
|
||||
pgclk->PCHCTRL[TC0_GCLK_ID].bit.GEN = GEN_TC45;
|
||||
@ -289,37 +251,27 @@ uint32_t CLK_enable_timebase(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t CLK_get_ms(void)
|
||||
void CLK_delay_us(uint32_t usec)
|
||||
{
|
||||
return ms_clk;
|
||||
}
|
||||
|
||||
void CLK_delay_us(uint16_t usec)
|
||||
{
|
||||
us_delay_done = 0;
|
||||
|
||||
if (TC5->COUNT16.CTRLA.bit.ENABLE)
|
||||
{
|
||||
TC5->COUNT16.CTRLA.bit.ENABLE = 0;
|
||||
while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {}
|
||||
}
|
||||
|
||||
if (usec < 10) usec = 0;
|
||||
else usec -= 10;
|
||||
|
||||
TC5->COUNT16.CC[0].reg = usec;
|
||||
while (TC5->COUNT16.SYNCBUSY.bit.CC0) {}
|
||||
|
||||
TC5->COUNT16.CTRLA.bit.ENABLE = 1;
|
||||
while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {}
|
||||
|
||||
while (!us_delay_done) {}
|
||||
asm (
|
||||
"CBZ R0, return\n\t" //If usec == 0, branch to return label
|
||||
);
|
||||
asm (
|
||||
"MULS R0, %0\n\t" //Multiply R0(usec) by usec_delay_mult and store in R0
|
||||
".balign 16\n\t" //Ensure loop is aligned for fastest performance
|
||||
"loop: SUBS R0, #1\n\t" //Subtract 1 from R0 and update flags (1 cycle)
|
||||
"BNE loop\n\t" //Branch if non-zero to loop label (2 cycles) NOTE: USEC_DELAY_LOOP_CYCLES is the sum of loop cycles
|
||||
"return:\n\t" //Return label
|
||||
: //No output registers
|
||||
: "r" (usec_delay_mult) //For %0
|
||||
);
|
||||
//Note: BX LR generated
|
||||
}
|
||||
|
||||
void CLK_delay_ms(uint64_t msec)
|
||||
{
|
||||
msec += CLK_get_ms();
|
||||
while (msec > CLK_get_ms()) {}
|
||||
msec += timer_read64();
|
||||
while (msec > timer_read64()) {}
|
||||
}
|
||||
|
||||
void clk_enable_sercom_apbmask(int sercomn)
|
||||
|
@ -77,9 +77,8 @@ void CLK_oscctrl_init(void);
|
||||
void CLK_reset_time(void);
|
||||
uint32_t CLK_set_gclk_freq(uint8_t gclkn, uint32_t freq);
|
||||
uint32_t CLK_enable_timebase(void);
|
||||
uint32_t CLK_get_ms(void);
|
||||
uint64_t CLK_get_us(void);
|
||||
void CLK_delay_us(uint16_t usec);
|
||||
uint64_t timer_read64(void);
|
||||
void CLK_delay_us(uint32_t usec);
|
||||
void CLK_delay_ms(uint64_t msec);
|
||||
|
||||
uint32_t CLK_set_spi_freq(uint8_t sercomn, uint32_t freq);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user