Compare commits

..

16 Commits

Author SHA1 Message Date
829906969c Update Norwegian keymap and add sendstring LUT (#8300) 2020-03-08 15:43:05 +11:00
e0d15e6182 fixed #8259 (#8333) 2020-03-07 13:19:06 +00:00
3a303bd2ae Backlight - Carve out a better location for private driver functionality (#8329)
* rename backlight_soft to match rules.mk

* rename backlight_soft to match rules.mk - update common_features

* Carve out a better location for private driver backlight functionality
2020-03-07 12:09:49 +00:00
d7ba0ad684 [Keyboard] Handwired Skeeb Keyboard (#8161)
* adding Handwired Skeeb Keyboard

* Apply suggestions from fauxpark

* Apply more suggestions from fauxpark and small change to layout

* Apply more suggestions from noroadsleft and last tap dance
2020-03-07 01:53:05 -08:00
c4d8e56928 Added VIA keymap for Ramaworks M10-A (#8255)
* Added VIA keymap for Ramaworks M10-A

* change vendor/product in base config.h

* #pragma once

* Uee LAYOUT() in keymaps
2020-03-07 01:38:08 -08:00
5e1ce3988d Remove unused LED_BREATHING_TABLE 2020-03-06 22:29:01 -08:00
dd05007f3b [Docs] i2c_driver translation to Japanese (#8274)
* [WIP] i2c_driver translation to ja

* update docs/ja/i2c_driver.md

* update docs/ja/i2c_driver.md

* align table + remove comment

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* Update docs/ja/i2c_driver.md

* add original document commit hash

Co-Authored-By: shela <shelaf@users.noreply.github.com>
2020-03-06 18:27:15 -08:00
2306c974e5 format code according to conventions [skip ci] 2020-03-07 01:24:47 +00:00
833c5ae87a Buffer based OLED panning, write byte to buffer at arbitrary index (#8055)
* Add buffer based single line pan, arbitrary byte write to buffer

* Change dirty mask to inverse of OLED_BLOCK_TYPE for future proofing larger buffer sizes

* Updating docs to include new functions

* Updating to clarify scroll vs pan
2020-03-07 00:52:39 +00:00
57de9e65ef Super 16 Puzzle Game (#8306)
* 15/16 game with lights for the super 16

* Updated readme with style

* adding comments and initial style to keymap

trying to make the code look prettier, need to test by redownloading

* Final style revisions before pull request

* formatting changes, removed config.h

* modified rules.mk, works with changes in PR8314

* formatting

no number of spaces is enough for a newline, whoops

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Update keyboards/1upkeyboards/super16/keymaps/15game/keymap.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Update keyboards/1upkeyboards/super16/keymaps/15game/keymap.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Update keyboards/1upkeyboards/super16/keymaps/15game/keymap.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

Co-authored-by: Sam Reinehr <swreinehr@mines.edu>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-03-07 00:15:44 +00:00
6b6e47cbf1 DZ60 keyboard layout tuning and README update/fix (#8325)
* Added custom dz60 keymap

* Update readme.md

* Updated pictures in README.md

* README.md fixes

* Updated mouse layout/ added ` key

* Changed bkspc key to del in mod

* Changed picture

* Updated keymap

* Removed default dz60 config.h

* Updated Readme

* Added Devorak Keymap

* Re-added Default Config File

* Updated Flash Command

* Cleaned Up Custom Config File

* Added Lock Security Layer

* Updated Readme Picture

* Fixed Readme

* Re-added keyboard picture

* Added home and end button

* added insert, pgup, pgdn

* final commit before pull request

* fixing merge

* Added custom dz60 keymap

* adding lufa?

Co-authored-by: chrisae9 <chrisae9@penguin>
2020-03-07 00:11:41 +00:00
54b6bf5910 [Keyboard] Add VIA support for neuron (#8264)
* add VIA support for neuron

* update neuron vendor and product id

* update neuron product id

Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
2020-03-06 16:00:44 -08:00
73728e9bec [Docs] Fix links in Config Options doc 2020-03-06 13:10:17 -08:00
4f1a62ca1d [Keyboard] keebwerk. nano. slider support (#7914)
* Initial Keeb.werk nano.slider support

* fixed open ifdef

* Fixed layout macros

* Added LTO

* Enabled LTO and dissabled console

* Added basic slider example

* rate limited adc, and fixed send_string

* Made slider courser

* new-line after each slider print

* Switched slider example mirror the stock behavior using midi

* switched division to bit-shifting

* Apply suggestions from code review

* Update keyboards/keebwerk/nano_slider/keymaps/default/keymap.c

* Update keyboards/keebwerk/nano_slider/config.h

* Update keyboards/keebwerk/nano_slider/config.h

* Applied suggestions from code review

* Apply suggestions from code review

* Added fauxparks info.json

* Reverse midi value direction, move to QMKVID

* Update keyboards/keebwerk/nano_slider/config.h

* Update keyboards/keebwerk/nano_slider/config.h

* Update keyboards/keebwerk/nano_slider/keymaps/default/keymap.c

* Apply suggestions from code review

* Update keyboards/keebwerk/nano_slider/rules.mk

* Update keyboards/keebwerk/nano_slider/nano_slider.h

* Update keyboards/keebwerk/nano_slider/readme.md

* Defined backlight pin and settings
2020-03-06 11:00:17 -08:00
4e826ba61f Correct typo in tap_hold.md (#8326)
Correct typo: "reasonal" to "reasonable"
2020-03-07 05:42:08 +11:00
b438c6f8ea Fix up Arm builds with nix-shell. (#8312) 2020-03-07 03:05:51 +11:00
59 changed files with 1723 additions and 242 deletions

View File

@ -159,7 +159,6 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE := yes
LED_BREATHING_TABLE := yes
RGB_KEYCODES_ENABLE := yes
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
@ -298,24 +297,27 @@ VALID_BACKLIGHT_TYPES := pwm software custom
BACKLIGHT_ENABLE ?= no
BACKLIGHT_DRIVER ?= pwm
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
endif
COMMON_VPATH += $(QUANTUM_DIR)/backlight
SRC += $(QUANTUM_DIR)/backlight/backlight.c
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE
ifeq ($(strip $(BACKLIGHT_DRIVER)), custom)
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
else ifeq ($(strip $(BACKLIGHT_DRIVER)), software)
SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c
else
ifeq ($(PLATFORM),AVR)
SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
ifeq ($(PLATFORM),AVR)
SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
else
SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
endif
else
SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
endif
endif
endif
@ -351,11 +353,6 @@ ifeq ($(strip $(CIE1931_CURVE)), yes)
LED_TABLES := yes
endif
ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
OPT_DEFS += -DUSE_LED_BREATHING_TABLE
LED_TABLES := yes
endif
ifeq ($(strip $(LED_TABLES)), yes)
SRC += $(QUANTUM_DIR)/led_tables.c
endif

View File

@ -136,22 +136,22 @@ If you define these options you will enable the associated feature, which may in
* enables handling for per key `TAPPING_TERM` settings
* `#define RETRO_TAPPING`
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
* See [Retro Tapping](#retro-tapping) for details
* See [Retro Tapping](tap_hold.md#retro-tapping) for details
* `#define TAPPING_TOGGLE 2`
* how many taps before triggering the toggle
* `#define PERMISSIVE_HOLD`
* makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the `TAPPING_TERM`
* See [Permissive Hold](#permissive-hold) for details
* See [Permissive Hold](tap_hold.md#permissive-hold) for details
* `#define PERMISSIVE_HOLD_PER_KEY`
* enabled handling for per key `PERMISSIVE_HOLD` settings
* `#define IGNORE_MOD_TAP_INTERRUPT`
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the `TAPPING_TERM` for both keys.
* See [Mod tap interrupt](#ignore-mod-tap-interrupt) for details
* See [Ignore Mod Tap Interrupt](tap_hold.md#ignore-mod-tap-interrupt) for details
* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
* enables handling for per key `IGNORE_MOD_TAP_INTERRUPT` settings
* `#define TAPPING_FORCE_HOLD`
* makes it possible to use a dual role key as modifier shortly after having been tapped
* See [Hold after tap](#tapping-force-hold)
* See [Tapping Force Hold](tap_hold.md#tapping-force-hold)
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
* `#define TAPPING_FORCE_HOLD_PER_KEY`
* enables handling for per key `TAPPING_FORCE_HOLD` settings

View File

@ -221,6 +221,12 @@ void oled_write(const char *data, bool invert);
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
void oled_write_ln(const char *data, bool invert);
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
// Useful for moving the screen in preparation for new drawing
// oled_scroll_left or oled_scroll_right should be preferred for all cases of moving a static
// image such as a logo or to avoid burn-in as it's much, much less cpu intensive
void oled_pan(bool left);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
@ -235,6 +241,9 @@ void oled_write_ln_P(const char *data, bool invert);
// Writes a string to the buffer at current cursor position
void oled_write_raw(const char *data, uint16_t size);
// Writes a single byte into the buffer at the specified index
void oled_write_raw_byte(const char data, uint16_t index);
// Writes a PROGMEM string to the buffer at current cursor position
void oled_write_raw_P(const char *data, uint16_t size);

128
docs/ja/i2c_driver.md Normal file
View File

@ -0,0 +1,128 @@
# I2C マスタドライバ
<!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: 85041ff05:docs/i2c_driver.md
git diff 85041ff05 HEAD -- docs/i2c_driver.md | cat
-->
QMK で使われる I2C マスタドライバには、MCU 間のポータビリティを提供するための一連の関数が用意されています。
## 使用できる関数
| 関数 | 説明 |
|-------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `void i2c_init(void);` | I2C ドライバを初期化します。他のあらゆるトランザクションを開始する前に、この関数を一度だけ呼ぶ必要があります。 |
| `uint8_t i2c_start(uint8_t address, uint16_t timeout);` | I2C トランザクションを開始します。アドレスは方向ビットのない7ビットスレーブアドレスです。 |
| `uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` | I2C 経由でデータを送信します。アドレスは方向ビットのない7ビットスレーブアドレスです。トランザクションのステータスを返します。 |
| `uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` | I2C 経由でデータを受信します。アドレスは方向ビットのない7ビットスレーブアドレスです。 `length` で指定した長さのバイト列を `data` に保存し、トランザクションのステータスを返します。 |
| `uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` | `i2c_transmit` と同様ですが、 `regaddr` でスレーブのデータ書き込み先のレジスタを指定します。 |
| `uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` | `i2c_receive` と同様ですが、 `regaddr` でスレーブのデータ読み込み先のレジスタを指定します。 |
| `uint8_t i2c_stop(void);` | I2C トランザクションを終了します。 |
### 関数の戻り値
`void i2c_init(void)` を除く上にあるすべての関数は、次の真理値表にある値を返します。
| 戻り値 | 説明 |
|--------|------------------------------|
| 0 | 処理が正常に実行されました。 |
| -1 | 処理に失敗しました。 |
| -2 | 処理がタイムアウトしました。 |
## AVR
### 設定
I2Cマスタドライバを設定するために、次の定義が使えます。
| 変数 | 説明 | 既定値 |
|---------|---------------------|--------|
| `F_SCL` | クロック周波数 (Hz) | 400KHz |
AVR は通常 I2C ピンとして使う GPIO が設定されているので、これ以上の設定は必要ありません。
## ARM
ARM の場合は、内部に ChibiOS I2C HAL ドライバがあります。この節では STM32 MCU を使用していると仮定します。
### 設定
ARM MCU 用の設定はしばしば非常に複雑です。これは、多くの場合複数の I2C ドライバをさまざまなポートに対して割り当てられるためです。
最初に、必要なハードウェアドライバを有効にするために `mcuconf.h` ファイルをセットアップします。
| 変数 | 説明 | 既定値 |
|-------------------------------|------------------------------------------------------------------------------------------------|--------|
| `#STM32_I2C_USE_XXX` | ハードウェアドライバ XXX の有効化/無効化(すべてのドライバを明示的にリストアップする必要あり) | FALSE |
| `#STM32_I2C_BUSY_TIMEOUT` | レスポンスの受信がない場合に I2C コマンドを中断するまでの時間 (ms) | 50 |
| `#STM32_I2C_XXX_IRQ_PRIORITY` | ハードウェアドライバ XXX の割り込み優先度(上級者向けの設定) | 10 |
| `#STM32_I2C_USE_DMA` | MCU がデータ送信を DMA ユニットにオフロードする機能の有効化/無効化 | TRUE |
| `#STM32_I2C_XXX_DMA_PRIORITY` | ハードウェアドライバ XXX に使用する DMA ユニットの優先度(上級者向けの設定) | 1 |
次に `halconf.h` ファイル内で `#define HAL_USE_I2C``TRUE` にします。これにより ChibiOS が I2C ドライバを読み込みます。
最後に、使用したい I2C ハードウェアドライバに応じて正しい GPIO ピンを割り当てます。
標準では I2C1 ハードウェアドライバが使われます。もし他のハードウェアドライバを使う場合、 `config.h` ファイルに `#define I2C_DRIVER I2CDX` を追加します( X は使用するハードウェアドライバの番号です)。例えば I2C3 を有効化する場合、`config.h` ファイルに `#define I2C_DRIVER I2CD3` と定義します。これにより QMK I2C ドライバと ChibiOS I2C driver が同期されます。
STM32 MCU では、使用するハードウェアドライバにより、さまざまなピンを I2C ピンとして設定できます。標準では `B6`, `B7` ピンが I2C 用のピンです。 I2C 用のピンを設定するために次の定義が使えます:
| 変数 | 説明 | 既定値 |
|-----------------------|--------------------------------------------------------------------------------------------------|---------|
| `I2C1_SCL_BANK` | SCL に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` |
| `I2C1_SDA_BANK` | SDA に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` |
| `I2C1_SCL` | SCL のピン番号 (0-9) | `6` |
| `I2C1_SDA` | SDA のピン番号 (0-9) | `7` |
| `I2C1_BANK`(非推奨) | 使用するピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`)。後継は `I2C1_SCL_BANK`, `I2C1_SDA_BANK` です。 | `GPIOB` |
ChibiOS I2C ドライバの設定項目は STM32 MCU の種類に依存します。
STM32F1xx, STM32F2xx, STM32F4xx, STM32L0xx, STM32L1xx では I2Cv1 が使われます。
STM32F0xx, STM32F3xx, STM32F7xx, STM32L4xx では I2Cv2 が使われます。
#### I2Cv1
STM32 MCU の I2Cv1 では、クロック周波数とデューティ比を次の変数で変更できます。詳しくは <https://www.playembedded.org/blog/stm32-i2c-chibios/#I2Cv1_configuration_structure> を参照してください。
| 変数 | 既定値 |
|--------------------|------------------|
| `I2C1_OPMODE` | `OPMODE_I2C` |
| `I2C1_CLOCK_SPEED` | `100000` |
| `I2C1_DUTY_CYCLE` | `STD_DUTY_CYCLE` |
#### I2Cv2
STM32 MCU の I2Cv2 では、信号のタイミングパラメータを次の変数で変更できます。詳しくは <https://www.st.com/en/embedded-software/stsw-stm32126.html> を参照してください。
| 変数 | 既定値 |
|-----------------------|--------|
| `I2C1_TIMINGR_PRESC` | `15U` |
| `I2C1_TIMINGR_SCLDEL` | `4U` |
| `I2C1_TIMINGR_SDADEL` | `2U` |
| `I2C1_TIMINGR_SCLH` | `15U` |
| `I2C1_TIMINGR_SCLL` | `21U` |
STM32 MCU では GPIO ピンを設定するとき、別の「代替機能」モードを使うことができます。これは I2Cv2 モードで使われるピンを変更するために必要です。適切な設定値は、使用している MCU のデータシートを参照してください。
| 変数 | 既定値 |
|---------------------|--------|
| `I2C1_SCL_PAL_MODE` | `4` |
| `I2C1_SDA_PAL_MODE` | `4` |
#### その他
`void i2c_init(void)` 関数は `weak` 属性が付いており、オーバーロードすることができます。この場合、上記で設定した変数は使用されません。可能な GPIO の設定については、 MCU のデータシートを参照してください。次に示すのは初期化関数の例です:
```C
void i2c_init(void)
{
setPinInput(B6); // Try releasing special pins for a short time
setPinInput(B7);
wait_ms(10); // Wait for the release to happen
palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B6 to I2C function
palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B7 to I2C function
}
```

View File

@ -1,6 +1,6 @@
# Tap-Hold Configuration Options
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonal defaults, but that may still cause issues for some people.
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people.
These options let you modify the behavior of the Tap-Hold keys.

View File

@ -428,6 +428,31 @@ void oled_write_ln(const char *data, bool invert) {
oled_advance_page(true);
}
void oled_pan(bool left) {
uint16_t i = 0;
for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT / 8; y++) {
if (left) {
for (uint16_t x = 0; x < OLED_DISPLAY_WIDTH - 1; x++) {
i = y * OLED_DISPLAY_WIDTH + x;
oled_buffer[i] = oled_buffer[i + 1];
}
} else {
for (uint16_t x = OLED_DISPLAY_WIDTH - 1; x > 0; x--) {
i = y * OLED_DISPLAY_WIDTH + x;
oled_buffer[i] = oled_buffer[i - 1];
}
}
}
oled_dirty = ~((OLED_BLOCK_TYPE)0);
}
void oled_write_raw_byte(const char data, uint16_t index) {
if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE;
if (oled_buffer[index] == data) return;
oled_buffer[index] = data;
oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
}
void oled_write_raw(const char *data, uint16_t size) {
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
for (uint16_t i = 0; i < size; i++) {

View File

@ -200,7 +200,11 @@ void oled_write(const char *data, bool invert);
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
void oled_write_ln(const char *data, bool invert);
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
void oled_pan(bool left);
void oled_write_raw(const char *data, uint16_t size);
void oled_write_raw_byte(const char data, uint16_t index);
#if defined(__AVR__)
// Writes a PROGMEM string to the buffer at current cursor position

View File

@ -0,0 +1,110 @@
/* Copyright 2020 Sam Reinehr
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
enum my_keycodes {
K00 = SAFE_RANGE,
K01,
K02,
K03,
K04,
K05,
K06,
K07,
K08,
K09,
K10,
K11,
K12,
K13,
K14,
K15,
};
/* just a simple way to give each key a unique code */
//clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[0] = LAYOUT_ortho_4x4(
K00, K01, K02, K03,
K04, K05, K06, K07,
K08, K09, K10, K11,
K12, K13, K14, K15
)
};
/* flags describing current free square/0 */
uint8_t current = 0;
/* r g and b describe the colors for the initial map,
currently blank for free, and evenly spaced hues with maximum sat/value */
const uint8_t r[16] = {
0x00, 0xFF, 0xFF, 0xFF,
0xCC, 0x66, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x66, 0xCC, 0xFF, 0xFF
};
const uint8_t g[16] = {
0x00, 0x00, 0x66, 0xCC,
0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xCC, 0x66, 0x00,
0x00, 0x00, 0x00, 0x00
};
const uint8_t b[16] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x66,
0xCC, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xCC, 0x66
};
/* pos contains the current positions, could technically be compressed to 4 bits per, but not worth it
index into pos is the position we're looking at, output is the tile that is currently there */
uint8_t tiles[16] = {
0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11,
12, 13, 14, 15
};
/* default led array for super 16 has them in a snake, so we must do some remapping/flipping of the 2nd and 4th rows */
uint8_t remap[16] = {
0, 1, 2, 3,
7, 6, 5, 4,
8, 9, 10, 11,
15, 14, 13, 12
};
//clang-format on
/* function to refresh the led coloring with the positions with current tiles */
void refresh_leds(void) {
for (uint8_t index = 0; index < 16; ++index) {
uint8_t tile = tiles[index];
setrgb(r[tile], g[tile], b[tile], (LED_TYPE *)&led[remap[index]]);
}
rgblight_set();
}
void keyboard_post_init_user(void) {
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_enable_noeeprom();
refresh_leds();
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint8_t offset = keycode - K00;
uint8_t x = offset & 0x03;
uint8_t y = (offset & 0x0C) >> 2;
/* if the adjacent space exists and is empty, */
if ((x > 0 && 0 == tiles[offset - 1]) || (y > 0 && 0 == tiles[offset - 4]) || (x < 3 && 0 == tiles[offset + 1]) || (y < 3 && 0 == tiles[offset + 4])) {
/* set the currently blank tile to this tile, and make this one blank */
tiles[current] = tiles[offset];
tiles[offset] = 0;
current = offset;
}
refresh_leds();
return false;
}

View File

@ -0,0 +1,5 @@
# Trying to put a game that plays like the 15 puzzle on the super16
The 15/16 puzzle consists of a grid where one space is free, and adjacent spaces can be swapped with the free space
* future planned features:
* fix the start at red
* have a cute animation play when the puzzle is solved

View File

@ -0,0 +1,2 @@
RGBLIGHT_ENABLE = yes
RGB_MATRIX_ENABLE = no

View File

@ -48,4 +48,4 @@
#endif
/* VIA related config */
#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2

View File

@ -4,4 +4,4 @@
# dfu-programmer atmega32u4 reset
# run this in the qmk_firmware directory
make dz60:chrisae9:flash
make dz60:chrisae9:flash

View File

@ -17,10 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, TG(1), TG(1), TG(1), MO(3), KC_RALT, KC_NO, KC_RGUI, KC_RCTL),
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, TG(1), TG(1), TG(1), MO(3), KC_HOME, KC_NO, KC_PGDN, KC_END),
LAYOUT(
KC_PWR, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_NO, KC_PSCR,

View File

@ -4,11 +4,11 @@ This is a custom keymap for the layout of the DZ60.
## Keyboard Picture
![Keyboard Picture](https://i.imgur.com/AKDKAXN.png)
![Keyboard Picture](https://i.imgur.com/cbKxxx4.jpg)
## Keyboard Layout
![Chris DZ60](https://i.imgur.com/Z8XDwiI.png)
![Chris DZ60](https://i.imgur.com/sILXwXc.png)
## Setup

View File

@ -0,0 +1,47 @@
#pragma once
#include "config_common.h"
/* USB Device Descriptor Parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0100
#define MANUFACTURER DAG3
#define PRODUCT MySKeeb
#define DESCRIPTION Custom Split Keyboard
// Key Matrix Size //
// Rows are Doubled-up
#define MATRIX_ROWS 10
#define MATRIX_COLS 7
// Wiring of Each Half
#define DIODE_DIRECTION COL2ROW
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { B6, B2, B3, B1, F6, F7, F5 }
#define MATRIX_COL_PINS_RIGHT { F5, B3, F7, B1, F6, B2, B6 }
// Comunication and Split Detection
#define USE_SERIAL
#define SOFT_SERIAL_PIN D3
#define SELECT_SOFT_SERIAL_SPEED 1
#define SPLIT_USB_DETECT
#define EE_HANDS
#define SPLIT_USB_TIMEOUT 1000
// OLED Display Config
#define OLED_DISPLAY_128X64
#define OLED_FONT_HEIGHT 8
#define OLED_FONT_WIDTH 6
#define OLED_FONT_H "skeeb_font.c"
// Tap Dance
#define TAPPING_TERM 200
// Other
#define DEBOUNCE 0

View File

@ -0,0 +1,99 @@
#include QMK_KEYBOARD_H
#include "oled.c"
// [Init Variables] ----------------------------------------------------------//
// Tap Dance Enums Init
enum {
OP_QT = 0,
CL_QT,
TD_DQ,
TL,
};
// Tap Dance Functions
void tri_open(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code16(KC_LPRN);
} else if (state->count == 2) {
tap_code(KC_LBRC);
} else if (state->count == 3) {
tap_code16(S(KC_LBRC));
}
}
void tri_close(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code16(KC_RPRN);
} else if (state->count == 2) {
tap_code(KC_RBRC);
} else if (state->count == 3) {
tap_code16(S(KC_RBRC));
}
}
void dquote(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
if (state->interrupted)
tap_code(KC_QUOT);
else if (state->pressed)
tap_code(KC_QUOT);
else
tap_code16(KC_DQUO),
tap_code(KC_SPC);
}
}
void tilded(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
if (state->interrupted)
tap_code16(KC_TILD);
else if (state->pressed)
tap_code16(KC_TILD);
else
tap_code16(KC_AT);
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
[OP_QT] = ACTION_TAP_DANCE_FN(tri_open),
[CL_QT] = ACTION_TAP_DANCE_FN(tri_close),
[TD_DQ] = ACTION_TAP_DANCE_FN(dquote),
[TL] = ACTION_TAP_DANCE_FN(tilded),
};
// [Layer Keymaps] -----------------------------------------------------------//
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TD(OP_QT), TD(CL_QT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TD(TD_DQ),
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CALC, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, LT(1,KC_BSPC), KC_SPC, KC_ENT, KC_ENT, KC_SPC, TD(TL), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
[1] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC,
KC_CAPS, KC_PDOT, KC_PPLS, KC_PMNS, KC_PAST, KC_PSLS, KC_MSEL, KC_MSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PWR, RESET,
KC_TAB, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NO, KC_NO, KC_SLCK, NK_ON, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LSFT, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_MUTE, KC_MPLY, KC_NLCK, NK_OFF, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_TRNS, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, TO(2), KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
[2] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_NO, TO(3), KC_NO, KC_NO, KC_LALT, KC_TAB
),
[3] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TAB, KC_A, KC_W, KC_E, KC_R, KC_T, KC_H, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_LSFT, KC_Z, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_LCTL, KC_NO, KC_X, KC_C, KC_V, KC_B, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_SPC, KC_Q, KC_NO, KC_NO, TO(0), KC_NO, KC_NO, KC_LALT, KC_TAB
)
};

View File

@ -0,0 +1 @@
#include "myskeeb.h"

View File

@ -0,0 +1,22 @@
#include "quantum.h"
#define LAYOUT( \
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06 }, \
{ L10, L11, L12, L13, L14, L15, L16 }, \
{ L20, L21, L22, L23, L24, L25, L26 }, \
{ L30, L31, L32, L33, L34, L35, L36 }, \
{ L40, L41, L42, L43, L44, L45, L46 }, \
{ R00, R01, R02, R03, R04, R05, R06 }, \
{ R10, R11, R12, R13, R14, R15, R16 }, \
{ R20, R21, R22, R23, R24, R25, R26 }, \
{ R30, R31, R32, R33, R34, R35, R36 }, \
{ R40, R41, R42, R43, R44, R45, R46 } \
}

View File

@ -0,0 +1,229 @@
// [OLED Configuration] ---------------------------------------------//
// Draw
static const char PROGMEM skeeb_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0};
static const char PROGMEM oled_header[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
0xc0,0};
static const char PROGMEM oled_layer_keylog_separator[] = {
0xc8,0xff,0};
static const char PROGMEM oled_layer_line_end[] = {
0xd4,0};
static const char PROGMEM oled_layer_keylog_bottom[] = {
0xc1,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc3,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc2,0};
static const char PROGMEM oled_line_start[] = {
0xc0,0};
static const char PROGMEM oled_mods_bottom[] = {
0xc1,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc2,0};
static const char PROGMEM oled_footer[] = {
0xc4,0xc5,0xc5,0xc9,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xcb,0xc5,0xc5,0xc6,0};
void render_skeeb_logo(void) {
static const char PROGMEM skeeb_logo[] = {
0x00, 0xc0, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03,
0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x19, 0x19, 0xff, 0xff, 0x01,
0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x19, 0x19, 0x99, 0x99, 0x99,
0x99, 0x99, 0x99, 0x01, 0x01, 0xff, 0xff, 0x81, 0x81, 0x7f, 0x7f, 0xff, 0xff, 0x7f, 0x7f, 0x81,
0x81, 0xff, 0xff, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xf9, 0xf9, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07,
0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00,
0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x0f, 0x0f, 0x08,
0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f,
0x0f, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x09, 0x09, 0x0e, 0x0e, 0x0f,
0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x0f,
0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10,
0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0xf8,
0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xff, 0x01, 0x01, 0xf1, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x1f, 0x10, 0x10, 0xf3, 0x02, 0x02, 0xf2, 0x12, 0x12, 0x1e, 0x00, 0x00, 0xff, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x0f, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f,
0x00, 0x00, 0x0f, 0x01, 0x01, 0x09, 0x08, 0x08, 0x09, 0x09, 0x09, 0x0f, 0x00, 0x00, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0,
0xf0, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0,
0xe0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x03, 0x00,0
};
oled_write_raw_P(skeeb_logo, sizeof(skeeb_logo));
}
// Mods Status
void render_mod_status(uint8_t modifiers) {
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("-"), false);
oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT));
oled_write_P(PSTR("-"), false);
oled_write_P(PSTR("CTR"), (modifiers & MOD_MASK_CTRL));
oled_write_P(PSTR("-"), false);
oled_write_P(PSTR("WIN"), (modifiers & MOD_MASK_GUI));
oled_write_P(PSTR("-"), false);
oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT));
oled_write_P(PSTR("-"), false);
oled_write_P(PSTR(" "), false);
}
// Layer State
void render_layer_state(void){
switch (get_highest_layer(layer_state)) {
case 0: oled_write_P(PSTR(" QWERTY "), false); break;
case 1: oled_write_P(PSTR(" MEDIA "), false); break;
case 2: oled_write_P(PSTR(" MOBA "), false); break;
case 3: oled_write_P(PSTR(" FPS "), false); break;
default: oled_write_P(PSTR("Undefined"), false);
}
}
// Keylock State
void render_keylock_status(uint8_t led_usb_state) {
oled_write_P(PSTR(" "), false);
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("-NUML") : PSTR("-----"), false);
oled_write_P(PSTR(" "), false);
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("-CAPS") : PSTR("-----"), false);
oled_write_P(PSTR(" "), false);
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("-SCRL") : PSTR("-----"), false);
oled_write_P(PSTR(" "), false);
}
// Keylogger
# define KEYLOGGER_LENGTH 8
static uint32_t oled_timer = 0;
static char keylog_str[KEYLOGGER_LENGTH + 1] = {0};
static const char PROGMEM code_to_name[0xFF] = {
// 0 1 2 3 4 5 6 7 8 9 A B c D E F
182, ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
'3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 17, 29, 22, '-', '=', '[', // 2x
']','\\', '#', ';','\'', '`', ',', '.', '/', 188, 149, 150, 151, 152, 153, 154, // 3x
155, 156, 157, 158, 159, 181, 191, 190, ' ', ' ', 185, 183, 16, 186, 184, 26, // 4x
27, 25, 24, 189, '/', '*', '-', '+', ' ', '1', '2', '3', '4', '5', '6', '7', // 5x
'8', '9', '0', '.', ' ', 187, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 214, 215, 216, 217, 218, 219, 220, 221, // Ax
' ', ' ', 213, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
'C', 'S', 'A', 'W', ' ', 'S', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
};
void add_keylog(uint16_t keycode);
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
oled_timer = timer_read32();
add_keylog(keycode);
}
return true;
}
void add_keylog(uint16_t keycode) {
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
keycode = keycode & 0xFF;
} else if (keycode > 0xFF) {
keycode = 0;
}
for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
keylog_str[i] = keylog_str[i - 1];
}
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
}
}
void render_keylogger_status(void) {
oled_write(keylog_str, false);
}
// [OLED Init] ------------------------------------------------------//
// Rotate Screen
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
// {OLED Task} ------------------------------------------------------//
void oled_task_user(void) {
// MASTER SIDE
if (is_keyboard_master()) {
oled_write_P(oled_header, false);
render_layer_state();
oled_write_P(oled_layer_keylog_separator, false);
render_keylogger_status();
oled_set_cursor(20, 2);
oled_write_P(oled_layer_line_end, false);
oled_write_P(oled_layer_keylog_bottom, false);
oled_write_P(oled_line_start, false);
render_keylock_status(host_keyboard_leds());
oled_write_P(oled_layer_line_end, false);
oled_write_P(oled_mods_bottom, false);
oled_write_P(oled_line_start, false);
render_mod_status(get_mods() | get_oneshot_mods());
oled_write_P(oled_layer_line_end, false);
oled_write_P(oled_footer, false);
}
// SLAVE SIDE
else {
render_skeeb_logo();
}
}

View File

@ -0,0 +1,34 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = caterina
# Build Options
# change yes to no to disable
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
MIDI_ENABLE = no # MIDI controls
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
SPLIT_KEYBOARD = yes # Enables split keyboard support
OLED_DRIVER_ENABLE = yes
NO_USB_STARTUP_CHECK = yes
TAP_DANCE_ENABLE = yes

View File

@ -0,0 +1,91 @@
#include "progmem.h"
// Custom 8x6 font with Custom Logo
// Online editor: https://javl.github.io/image2cpp/
static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x5b, 0x4f, 0x5b, 0x3e, 0x00, 0x3e, 0x6b, 0x4f, 0x6b,
0x3e, 0x00, 0x1c, 0x3e, 0x7c, 0x3e, 0x1c, 0x00, 0x18, 0x3c, 0x7e, 0x3c, 0x18, 0x00, 0x1c, 0x57,
0x7d, 0x57, 0x1c, 0x00, 0x1c, 0x5e, 0x7f, 0x5e, 0x1c, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x00,
0xff, 0xe7, 0xc3, 0xe7, 0xff, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xff, 0xe7, 0xdb, 0xe7,
0xff, 0x00, 0x30, 0x48, 0x3a, 0x06, 0x0e, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7f,
0x05, 0x05, 0x07, 0x00, 0x40, 0x7f, 0x05, 0x25, 0x3f, 0x00, 0x5a, 0x3c, 0xe7, 0x3c, 0x5a, 0x00,
0x7f, 0x3e, 0x1c, 0x1c, 0x08, 0x00, 0x08, 0x1c, 0x1c, 0x3e, 0x7f, 0x00, 0x14, 0x22, 0x7f, 0x22,
0x14, 0x00, 0x5f, 0x5f, 0x00, 0x5f, 0x5f, 0x00, 0x06, 0x09, 0x7f, 0x01, 0x7f, 0x00, 0x00, 0x66,
0x89, 0x95, 0x6a, 0x00, 0x60, 0x40, 0x40, 0x40, 0x60, 0x00, 0x94, 0xa2, 0xff, 0xa2, 0x94, 0x00,
0x08, 0x04, 0x7e, 0x04, 0x08, 0x00, 0x10, 0x20, 0x7e, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2a, 0x1c,
0x08, 0x00, 0x08, 0x1c, 0x2a, 0x08, 0x08, 0x00, 0x1e, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0c, 0x1e,
0x0c, 0x1e, 0x0c, 0x00, 0x30, 0x38, 0x3e, 0x38, 0x30, 0x00, 0x06, 0x0e, 0x3e, 0x0e, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07,
0x00, 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14, 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12, 0x00, 0x23, 0x13,
0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
0x00, 0x1c, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00, 0x00, 0x2a, 0x1c, 0x7f, 0x1c,
0x2a, 0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08,
0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00, 0x00, 0x42, 0x7f, 0x40, 0x00, 0x00, 0x72, 0x49, 0x49, 0x49,
0x46, 0x00, 0x21, 0x41, 0x49, 0x4d, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7f, 0x10, 0x00, 0x27, 0x45,
0x45, 0x45, 0x39, 0x00, 0x3c, 0x4a, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1e, 0x00, 0x00, 0x00, 0x14, 0x00,
0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14,
0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
0x3e, 0x41, 0x5d, 0x59, 0x4e, 0x00, 0x7c, 0x12, 0x11, 0x12, 0x7c, 0x00, 0x7f, 0x49, 0x49, 0x49,
0x36, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x3e, 0x00, 0x7f, 0x49,
0x49, 0x49, 0x41, 0x00, 0x7f, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3e, 0x41, 0x41, 0x51, 0x73, 0x00,
0x7f, 0x08, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x41, 0x7f, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3f,
0x01, 0x00, 0x7f, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7f, 0x02,
0x1c, 0x02, 0x7f, 0x00, 0x7f, 0x04, 0x08, 0x10, 0x7f, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x3e, 0x00,
0x7f, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3e, 0x41, 0x51, 0x21, 0x5e, 0x00, 0x7f, 0x09, 0x19, 0x29,
0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7f, 0x01, 0x03, 0x00, 0x3f, 0x40,
0x40, 0x40, 0x3f, 0x00, 0x1f, 0x20, 0x40, 0x20, 0x1f, 0x00, 0x3f, 0x40, 0x38, 0x40, 0x3f, 0x00,
0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4d,
0x43, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41,
0x41, 0x41, 0x7f, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7f, 0x28, 0x44, 0x44,
0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, 0x38, 0x44, 0x44, 0x28, 0x7f, 0x00, 0x38, 0x54,
0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7e, 0x09, 0x02, 0x00, 0x18, 0xa4, 0xa4, 0x94, 0x78, 0x00,
0x7f, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7d, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3d,
0x00, 0x00, 0x7f, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7f, 0x40, 0x00, 0x00, 0x7c, 0x04,
0x78, 0x04, 0x78, 0x00, 0x7c, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
0xfc, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xfc, 0x00, 0x7c, 0x08, 0x04, 0x04,
0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3f, 0x44, 0x24, 0x00, 0x3c, 0x40,
0x40, 0x20, 0x7c, 0x00, 0x1c, 0x20, 0x40, 0x20, 0x1c, 0x00, 0x3c, 0x40, 0x30, 0x40, 0x3c, 0x00,
0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4c, 0x90, 0x90, 0x90, 0x7c, 0x00, 0x44, 0x64, 0x54, 0x4c,
0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x41,
0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x5c, 0x56, 0x53, 0x56, 0x5c, 0x00,
0xc0, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07,
0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0xff, 0xff,
0x01, 0x01, 0xff, 0xff, 0x01, 0x01, 0xff, 0xff, 0x19, 0x19, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
0x01, 0x01, 0xff, 0xff, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x19, 0x19, 0xff, 0xff,
0xf9, 0xf9, 0xf9, 0xf9, 0x01, 0x01, 0xf9, 0xf9, 0xf9, 0xf9, 0xff, 0xff, 0x99, 0x99, 0x99, 0x99,
0x99, 0x99, 0x99, 0x99, 0xf9, 0xf9, 0xff, 0xff, 0x19, 0x19, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
0x67, 0x67, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x1f, 0x05,
0x00, 0x02, 0x1f, 0x00, 0x1f, 0x05, 0x00, 0x1d, 0x17, 0x00, 0x1f, 0x05, 0x00, 0x15, 0x1f, 0x00,
0x1f, 0x05, 0x00, 0x07, 0x1c, 0x00, 0x1f, 0x05, 0x00, 0x17, 0x1d, 0x00, 0x1f, 0x05, 0x00, 0x1f,
0x1d, 0x00, 0x1f, 0x05, 0x00, 0x01, 0x1f, 0x00, 0x1f, 0x05, 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x05,
0x00, 0x07, 0x1f, 0x00, 0x1f, 0x05, 0x00, 0x70, 0x77, 0x00, 0x1f, 0x05, 0x00, 0x00, 0x77, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f,
0x0e, 0x0e, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
0x08, 0x08, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0xf9, 0xf9, 0x09, 0x09, 0x08, 0x08, 0x0f, 0x0f,
0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09,
0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x05,
0x00, 0x10, 0x77, 0x40, 0x7f, 0x41, 0x00, 0x41, 0x7f, 0x00, 0x11, 0x09, 0x65, 0x09, 0x11, 0x00,
0x44, 0x48, 0x53, 0x48, 0x44, 0x00, 0x3e, 0x00, 0x08, 0x14, 0x22, 0x00, 0x22, 0x14, 0x08, 0x00,
0x3e, 0x00, 0x49, 0x49, 0x49, 0x49, 0x49, 0x00, 0x5c, 0x56, 0x53, 0x56, 0x5c, 0x00, 0x07, 0x01,
0x77, 0x40, 0x40, 0x00, 0x04, 0x07, 0x71, 0x40, 0x40, 0x00, 0x7f, 0x51, 0x5d, 0x45, 0x7f, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0xff, 0x08, 0x08, 0x0f, 0x0f, 0x08, 0x08, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x03, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x01, 0x02, 0xfc, 0xf8, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x55, 0x40,
0x55, 0x00, 0x55, 0x00, 0x41, 0x55, 0x49, 0x55, 0x41, 0x00, 0x41, 0x49, 0x5d, 0x49, 0x41, 0x00,
0x41, 0x49, 0x49, 0x49, 0x41, 0x00, 0x5d, 0x49, 0x41, 0x5d, 0x49, 0x00, 0x49, 0x5d, 0x41, 0x49,
0x5d, 0x00, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x00, 0x41, 0x7f, 0x5d, 0x49, 0x41, 0x00, 0x7f, 0x41,
0x5d, 0x49, 0x41, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

View File

@ -0,0 +1,221 @@
/*
Copyright 2020 Duckle
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 0x03A8
#define PRODUCT_ID 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER keebwerk.
#define PRODUCT nano. slider
#define DESCRIPTION A small eight key macropad
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
/*
* Keyboard Matrix Assignments
*/
#define MATRIX_ROW_PINS { F0, F1 }
#define MATRIX_COL_PINS { B0, B1, B2, B3 }
#define UNUSED_PINS
#define SLIDER_PIN D4
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
#define RGB_DI_PIN F6
#ifdef RGB_DI_PIN
# define RGBLED_NUM 4
# 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
// /*== customize breathing effect ==*/
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
// /*==== use exp() and sin() ====*/
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* 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
/*
* 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 */
/* defined by default; to change, uncomment and set to the combination you want */
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
/* 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_HELP H
//#define MAGIC_KEY_HELP_ALT 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 0
//#define MAGIC_KEY_LAYER0_ALT GRAVE
//#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 B
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
//#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
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
# define NO_ACTION_MACRO
# define NO_ACTION_FUNCTION
#endif
/*
* 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

View File

@ -0,0 +1,21 @@
{
"keyboard_name": "nano. slider",
"url": "",
"maintainer": "qmk",
"width": 4,
"height": 3.25,
"layouts": {
"LAYOUT": {
"layout": [
{"x":0, "y":0},
{"x":0, "y":1.25},
{"x":1, "y":1.25},
{"x":2, "y":1.25},
{"x":0, "y":2.25},
{"x":1, "y":2.25},
{"x":2, "y":2.25},
{"x":3, "y":1.25, "h":2}
]
}
}
}

View File

@ -0,0 +1,86 @@
/* Copyright 2020 Duckle
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "analog.h"
#include "qmk_midi.h"
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN,
_DEMO
};
// 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] = {
/* Base */
[_BASE] = LAYOUT(
TO(_FN),
KC_1, KC_2, KC_3,
KC_4, KC_5, KC_6, KC_0
),
[_FN] = LAYOUT(
TO(_DEMO),
RGB_TOG, RGB_MOD, RGB_VAI,
_______, _______, _______, _______
),
[_DEMO] = LAYOUT(
TO(_BASE),
QMKBEST, _______, _______,
_______, _______, _______, QMKURL
)
};
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/\n");
} else {
// when keycode QMKURL is released
}
break;
}
return true;
}
uint8_t divisor = 0;
void slider(void) {
if (divisor++) { // only run the slider function 1/256 times it's called
return;
}
midi_send_cc(&midi_device, 2, 0x3E, 0x7F - (analogReadPin(SLIDER_PIN) >> 3));
}
void matrix_scan_user(void) {
slider();
}

View File

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

View File

@ -0,0 +1,18 @@
/* Copyright 2020 Duckle
*
* 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 "nano_slider.h"

View File

@ -0,0 +1,36 @@
/* Copyright 2020 Duckle
*
* 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 is 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( \
K11, \
K12, K10, K00, \
K01, K02, K03, K13 \
) { \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 } \
}

View File

@ -0,0 +1,15 @@
# nano. slider
![nano. slider](https://i.imgur.com/0UxyfxL.png)
A small eight key macropad with slider.
* Keyboard Maintainer: [Duckle29](https://github.com/Duckle29)
* Hardware Supported: nano. slider PCB, ATmega32U4
* Hardware Availability: [keebwerk.](https://www.keebwerk.com/product/nano-slider-keyboard/)
Make example for this keyboard (after setting up your build environment):
make keebwerk/nano_slider:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View File

@ -0,0 +1,31 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Build Options
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# 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 = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = yes # MIDI support
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
LTO_ENABLE = yes
SRC += analog.c

View File

@ -21,12 +21,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0007
#define DEVICE_VER 0x0001
#define MANUFACTURER Machine Industries
#define PRODUCT M10-A
#define DESCRIPTION RAMA x Machine Industries M10-A
#define VENDOR_ID 0x5241 // "RA"
#define PRODUCT_ID 0x00AA // 10-A
#define DEVICE_VER 0x0001
#define MANUFACTURER RAMA WORKS
#define PRODUCT RAMA WORKS M10-A
#define DESCRIPTION RAMA WORKS M10-A
/* key matrix size */
#define MATRIX_ROWS 4

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