aboutsummaryrefslogtreecommitdiff
path: root/keyboards/anavi/macropad8
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-04-10 12:13:40 +0100
committerAkshay <[email protected]>2022-04-10 12:13:40 +0100
commitdc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch)
tree4ccb8fa5886b66fa9d480edef74236c27f035e16 /keyboards/anavi/macropad8
Diffstat (limited to 'keyboards/anavi/macropad8')
-rw-r--r--keyboards/anavi/macropad8/config.h71
-rw-r--r--keyboards/anavi/macropad8/glcdfont.c232
-rw-r--r--keyboards/anavi/macropad8/info.json10
-rw-r--r--keyboards/anavi/macropad8/keymaps/default/config.h19
-rw-r--r--keyboards/anavi/macropad8/keymaps/default/keymap.c62
-rw-r--r--keyboards/anavi/macropad8/keymaps/git/config.h23
-rw-r--r--keyboards/anavi/macropad8/keymaps/git/keymap.c145
-rw-r--r--keyboards/anavi/macropad8/keymaps/kicad/keymap.c118
-rw-r--r--keyboards/anavi/macropad8/keymaps/kodi/keymap.c81
-rw-r--r--keyboards/anavi/macropad8/keymaps/obs/keymap.c98
-rw-r--r--keyboards/anavi/macropad8/keymaps/vlc/keymap.c138
-rw-r--r--keyboards/anavi/macropad8/keymaps/zoom/keymap.c97
-rw-r--r--keyboards/anavi/macropad8/macropad8.c1
-rw-r--r--keyboards/anavi/macropad8/macropad8.h11
-rw-r--r--keyboards/anavi/macropad8/readme.md18
-rw-r--r--keyboards/anavi/macropad8/rules.mk20
16 files changed, 1144 insertions, 0 deletions
diff --git a/keyboards/anavi/macropad8/config.h b/keyboards/anavi/macropad8/config.h
new file mode 100644
index 000000000..4ec8c7312
--- /dev/null
+++ b/keyboards/anavi/macropad8/config.h
@@ -0,0 +1,71 @@
1/*
2Copyright 2020 Leon Anavi <[email protected]>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xCEEB
24#define PRODUCT_ID 0x0001
25#define DEVICE_VER 0x0001
26#define MANUFACTURER ANAVI
27#define PRODUCT Macro Pad 8
28
29/* key matrix size */
30#define MATRIX_ROWS 2
31#define MATRIX_COLS 4
32
33/*
34 * Keyboard Matrix Assignments
35 *
36 * Change this to how you wired your keyboard
37 * COLS: AVR pins used for columns, left to right
38 * ROWS: AVR pins used for rows, top to bottom
39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
41 * NO_DIODE = switches are directly connected to AVR pins
42 *
43*/
44#define DIRECT_PINS { \
45 { D4, F6, B5, E6 }, \
46 { F5, F7, B4, C6 } \
47}
48
49#define BACKLIGHT_PIN D7
50#define BACKLIGHT_BREATHING
51#define BACKLIGHT_LEVELS 3
52#define RGBLIGHT_SLEEP
53
54#define UNUSED_PINS
55
56/* ws2812B RGB LED */
57#ifdef RGBLIGHT_ENABLE
58# define RGB_DI_PIN F4
59# define RGBLIGHT_ANIMATIONS
60# define RGBLED_NUM 4
61# define RGBLIGHT_HUE_STEP 10
62# define RGBLIGHT_SAT_STEP 17
63# define RGBLIGHT_VAL_STEP 17
64# define RGBLIGHT_LIMIT_VAL 255
65#endif
66
67#ifdef OLED_ENABLE
68# define OLED_DISPLAY_128X64
69# define OLED_TIMEOUT 60000
70# define OLED_FONT_H "keyboards/anavi/macropad8/glcdfont.c"
71#endif
diff --git a/keyboards/anavi/macropad8/glcdfont.c b/keyboards/anavi/macropad8/glcdfont.c
new file mode 100644
index 000000000..10ce3b345
--- /dev/null
+++ b/keyboards/anavi/macropad8/glcdfont.c
@@ -0,0 +1,232 @@
1#include "progmem.h"
2
3// Corne 8x6 font with QMK Firmware Logo
4// Online editor: https://helixfonteditor.netlify.com/
5
6// clang-format off
7const unsigned char font[] PROGMEM = {
80x00, 0x00, 0x00, 0x00, 0x00, 0x00,
90x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
100x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
110x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
120x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
130x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
140x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
150x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
160xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
170x00, 0x18, 0x24, 0x18, 0x00, 0x00,
180xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
190x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
200x26, 0x29, 0x79, 0x29, 0x26, 0x00,
210x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
220x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
230x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
240x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
250x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
260x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
270x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
280x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
290x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
300x60, 0x60, 0x60, 0x60, 0x60, 0x00,
310x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
320x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
330x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
340x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
350x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
360x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
370x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
380x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
390x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
400x00, 0x00, 0x00, 0x00, 0x00, 0x00,
410x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
420x00, 0x07, 0x00, 0x07, 0x00, 0x00,
430x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
440x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
450x23, 0x13, 0x08, 0x64, 0x62, 0x00,
460x36, 0x49, 0x56, 0x20, 0x50, 0x00,
470x00, 0x08, 0x07, 0x03, 0x00, 0x00,
480x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
490x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
500x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
510x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
520x00, 0x80, 0x70, 0x30, 0x00, 0x00,
530x08, 0x08, 0x08, 0x08, 0x08, 0x00,
540x00, 0x00, 0x60, 0x60, 0x00, 0x00,
550x20, 0x10, 0x08, 0x04, 0x02, 0x00,
560x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
570x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
580x72, 0x49, 0x49, 0x49, 0x46, 0x00,
590x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
600x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
610x27, 0x45, 0x45, 0x45, 0x39, 0x00,
620x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
630x41, 0x21, 0x11, 0x09, 0x07, 0x00,
640x36, 0x49, 0x49, 0x49, 0x36, 0x00,
650x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
660x00, 0x00, 0x14, 0x00, 0x00, 0x00,
670x00, 0x40, 0x34, 0x00, 0x00, 0x00,
680x00, 0x08, 0x14, 0x22, 0x41, 0x00,
690x14, 0x14, 0x14, 0x14, 0x14, 0x00,
700x00, 0x41, 0x22, 0x14, 0x08, 0x00,
710x02, 0x01, 0x59, 0x09, 0x06, 0x00,
720x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
730x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
740x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
750x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
760x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
770x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
780x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
790x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
800x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
810x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
820x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
830x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
840x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
850x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
860x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
870x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
880x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
890x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
900x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
910x26, 0x49, 0x49, 0x49, 0x32, 0x00,
920x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
930x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
940x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
950x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
960x63, 0x14, 0x08, 0x14, 0x63, 0x00,
970x03, 0x04, 0x78, 0x04, 0x03, 0x00,
980x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
990x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
1000x02, 0x04, 0x08, 0x10, 0x20, 0x00,
1010x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
1020x04, 0x02, 0x01, 0x02, 0x04, 0x00,
1030x40, 0x40, 0x40, 0x40, 0x40, 0x00,
1040x00, 0x03, 0x07, 0x08, 0x00, 0x00,
1050x20, 0x54, 0x54, 0x78, 0x40, 0x00,
1060x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
1070x38, 0x44, 0x44, 0x44, 0x28, 0x00,
1080x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
1090x38, 0x54, 0x54, 0x54, 0x18, 0x00,
1100x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
1110x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
1120x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
1130x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
1140x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
1150x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
1160x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
1170x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
1180x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
1190x38, 0x44, 0x44, 0x44, 0x38, 0x00,
1200x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
1210x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
1220x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
1230x48, 0x54, 0x54, 0x54, 0x24, 0x00,
1240x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
1250x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
1260x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
1270x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
1280x44, 0x28, 0x10, 0x28, 0x44, 0x00,
1290x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
1300x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
1310x00, 0x08, 0x36, 0x41, 0x00, 0x00,
1320x00, 0x00, 0x77, 0x00, 0x00, 0x00,
1330x00, 0x41, 0x36, 0x08, 0x00, 0x00,
1340x02, 0x01, 0x02, 0x04, 0x02, 0x00,
1350x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
1360x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1370x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1380x00, 0x00, 0x00, 0x00, 0xC0, 0xE0,
1390xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0,
1400xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF,
1410xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00,
1420x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1430x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0,
1440xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
1450xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
1460x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0,
1470xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80,
1480x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0,
1490xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00,
1500x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0,
1510xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80,
1520x00, 0x00, 0x00, 0x00, 0x80, 0xC0,
1530xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
1540xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00,
1550x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1560x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1570xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
1580xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
1590x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
1600x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
1610x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
1620x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
1630xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
1640xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
1650x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1660x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1670x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1680x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1690x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE,
1700xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF,
1710xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF,
1720xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
1730xFF, 0x1F, 0x07, 0x01, 0x00, 0x00,
1740x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1750x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00,
1760x00, 0x00, 0x00, 0x00, 0x00, 0x81,
1770xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF,
1780xFF, 0xFF, 0x81, 0x00, 0x00, 0x00,
1790x00, 0x00, 0x00, 0x81, 0xFF, 0xFF,
1800xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
1810x01, 0x00, 0x00, 0x00, 0x00, 0x00,
1820x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00,
1830x00, 0x00, 0x00, 0x01, 0xFF, 0xFF,
1840xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
1850x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
1860x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00,
1870x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1880x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1890x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
1900x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
1910x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
1920x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
1930x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
1940x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
1950x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
1960x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
1970x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1980x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1990x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2000x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2010x00, 0x00, 0x00, 0x03, 0x0F, 0x1F,
2020x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F,
2030x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F,
2040x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
2050x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C,
2060x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
2070x00, 0x00, 0x01, 0x03, 0x07, 0x07,
2080x07, 0x07, 0x07, 0x07, 0x07, 0x07,
2090x03, 0x01, 0x00, 0x00, 0x00, 0x00,
2100x01, 0x03, 0x07, 0x07, 0x07, 0x07,
2110x07, 0x07, 0x07, 0x07, 0x03, 0x01,
2120x00, 0x00, 0x00, 0x07, 0x07, 0x07,
2130x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2140x00, 0x07, 0x07, 0x07, 0x00, 0x00,
2150x00, 0x00, 0x00, 0x00, 0x07, 0x07,
2160x07, 0x00, 0x00, 0x00, 0x01, 0x03,
2170x07, 0x07, 0x07, 0x07, 0x07, 0x07,
2180x07, 0x07, 0x03, 0x01, 0x00, 0x00,
2190x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2200x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2210x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2220x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2230x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2240x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2250x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2260x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2270x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2280x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2290x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2300x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2310x00, 0x00, 0x00, 0x00, 0x00, 0x00,
232};
diff --git a/keyboards/anavi/macropad8/info.json b/keyboards/anavi/macropad8/info.json
new file mode 100644
index 000000000..8f6deed82
--- /dev/null
+++ b/keyboards/anavi/macropad8/info.json
@@ -0,0 +1,10 @@
1{
2 "keyboard_name": "ANAVI Macro Pad 8",
3 "url": "",
4 "maintainer": "leon-anavi",
5 "layouts": {
6 "LAYOUT_ortho_2x4": {
7 "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}]
8 }
9 }
10}
diff --git a/keyboards/anavi/macropad8/keymaps/default/config.h b/keyboards/anavi/macropad8/keymaps/default/config.h
new file mode 100644
index 000000000..dd687cad5
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/default/config.h
@@ -0,0 +1,19 @@
1/* Copyright 2021 QMK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#define LAYER_STATE_8BIT
diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c
new file mode 100644
index 000000000..84be7f3c6
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c
@@ -0,0 +1,62 @@
1#include QMK_KEYBOARD_H
2
3#define _MAIN 0
4#define _FN 1
5
6#define KC_X0 LT(_FN, KC_ESC)
7
8const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
9 [_MAIN] = LAYOUT_ortho_2x4(
10 G(KC_D), KC_UP, C(KC_C), C(KC_V),
11 KC_LEFT, KC_DOWN, KC_RGHT, MO(_FN)
12 ),
13
14 [_FN] = LAYOUT_ortho_2x4(
15 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
16 BL_TOGG, BL_STEP, BL_BRTG, _______
17 )
18};
19
20#ifdef OLED_ENABLE
21oled_rotation_t oled_init_user(oled_rotation_t rotation) {
22 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
23}
24
25bool oled_task_user(void) {
26 // Host Keyboard Layer Status
27 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
28 oled_write_P(PSTR("Active layer: "), false);
29
30 switch (get_highest_layer(layer_state)) {
31 case _MAIN:
32 oled_write_ln_P(PSTR("Main"), false);
33 break;
34 case _FN:
35 oled_write_ln_P(PSTR("FN"), false);
36 break;
37 default:
38 // Or use the write_ln shortcut over adding '\n' to the end of your string
39 oled_write_ln_P(PSTR("N/A"), false);
40 }
41
42 // Host Keyboard LED Status
43 led_t led_state = host_keyboard_led_state();
44 oled_write_P(PSTR("Num Lock: "), false);
45 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
46 oled_write_P(PSTR("Caps Lock: "), false);
47 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
48 oled_write_P(PSTR("Scroll Lock: "), false);
49 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
50 oled_write_P(PSTR("Backlit: "), false);
51 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
52#ifdef RGBLIGHT_ENABLE
53 static char rgbStatusLine1[26] = {0};
54 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
55 oled_write_ln(rgbStatusLine1, false);
56 static char rgbStatusLine2[26] = {0};
57 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
58 oled_write_ln(rgbStatusLine2, false);
59#endif
60 return false;
61}
62#endif
diff --git a/keyboards/anavi/macropad8/keymaps/git/config.h b/keyboards/anavi/macropad8/keymaps/git/config.h
new file mode 100644
index 000000000..3fe0304ff
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/git/config.h
@@ -0,0 +1,23 @@
1/* Copyright 2021 Leon Anavi <[email protected]>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#undef RGBLIGHT_ANIMATIONS
20#define RGBLIGHT_EFFECT_BREATHING
21#define RGBLIGHT_EFFECT_CHRISTMAS
22#define RGBLIGHT_EFFECT_RAINBOW_MOOD
23#define RGBLIGHT_EFFECT_SNAKE
diff --git a/keyboards/anavi/macropad8/keymaps/git/keymap.c b/keyboards/anavi/macropad8/keymaps/git/keymap.c
new file mode 100644
index 000000000..9b7afb5d6
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/git/keymap.c
@@ -0,0 +1,145 @@
1/* Copyright 2021 Leon Anavi <[email protected]>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19#define _MAIN 0
20#define _FN 1
21
22/*
23 * This keymap contains the following shortcuts for Git. On the
24 * first row from left to right:
25 *
26 * git status
27 * git log
28 * git pull
29 * git push
30 *
31 * On the second row from left to right:
32 *
33 * git diff
34 * git add
35 * git commit
36 * FN key to switch to the 2nd layout and control lights
37 *
38 */
39
40enum custom_keycodes {
41 GITCOMMIT = SAFE_RANGE,
42 GITPUSH,
43 GITPULL,
44 GITSTATUS,
45 GITDIFF,
46 GITLOG,
47 GITADD
48};
49
50bool process_record_user(uint16_t keycode, keyrecord_t *record) {
51 switch (keycode) {
52 case GITCOMMIT:
53 if (record->event.pressed) {
54 SEND_STRING("git commit -s\n");
55 }
56 break;
57 case GITPUSH:
58 if (record->event.pressed) {
59 SEND_STRING("git push\n");
60 }
61 break;
62 case GITPULL:
63 if (record->event.pressed) {
64 SEND_STRING("git pull\n");
65 }
66 break;
67 case GITSTATUS:
68 if (record->event.pressed) {
69 SEND_STRING("git status\n");
70 }
71 break;
72 case GITDIFF:
73 if (record->event.pressed) {
74 SEND_STRING("git diff ");
75 }
76 break;
77 case GITLOG:
78 if (record->event.pressed) {
79 SEND_STRING("git log\n");
80 }
81 break;
82 case GITADD:
83 if (record->event.pressed) {
84 SEND_STRING("git add ");
85 }
86 break;
87 }
88 return true;
89};
90
91const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
92 [_MAIN] = LAYOUT_ortho_2x4(
93 GITSTATUS, GITLOG, GITPULL, GITPUSH,
94 GITDIFF, GITADD, GITCOMMIT, MO(_FN)
95 ),
96
97 [_FN] = LAYOUT_ortho_2x4(
98 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
99 BL_TOGG, BL_STEP, BL_BRTG, _______
100 )
101};
102
103#ifdef OLED_ENABLE
104oled_rotation_t oled_init_user(oled_rotation_t rotation) {
105 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
106}
107
108bool oled_task_user(void) {
109 // Host Keyboard Layer Status
110 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
111 oled_write_P(PSTR("Active layer: "), false);
112
113 switch (get_highest_layer(layer_state)) {
114 case _MAIN:
115 oled_write_ln_P(PSTR("Git"), false);
116 break;
117 case _FN:
118 oled_write_ln_P(PSTR("FN"), false);
119 break;
120 default:
121 // Or use the write_ln shortcut over adding '\n' to the end of your string
122 oled_write_ln_P(PSTR("N/A"), false);
123 }
124
125 // Host Keyboard LED Status
126 led_t led_state = host_keyboard_led_state();
127 oled_write_P(PSTR("Num Lock: "), false);
128 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
129 oled_write_P(PSTR("Caps Lock: "), false);
130 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
131 oled_write_P(PSTR("Scroll Lock: "), false);
132 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
133 oled_write_P(PSTR("Backlit: "), false);
134 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
135#ifdef RGBLIGHT_ENABLE
136 static char rgbStatusLine1[26] = {0};
137 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
138 oled_write_ln(rgbStatusLine1, false);
139 static char rgbStatusLine2[26] = {0};
140 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
141 oled_write_ln(rgbStatusLine2, false);
142#endif
143 return false;
144}
145#endif
diff --git a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c
new file mode 100644
index 000000000..e75d58847
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c
@@ -0,0 +1,118 @@
1 /* Copyright 2020 Leon Anavi <[email protected]>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19#define _SCH 0
20#define _PCB 1
21#define _FN 2
22
23#define KC_X0 LT(_FN, KC_ESC)
24
25#ifdef RGBLIGHT_ENABLE
26// How long (in ms) to wait between animation steps for the rainbow mode
27const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15};
28// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations
29const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4};
30#endif
31
32/*
33 * The keymap contains 2 layers for KiCad hotkeys and a 3rd layer
34 * for controlling the backlighting and the underlighting.
35 *
36 * - Layer for KiCad Schematic hotkeys:
37 * m - to move selected component
38 * r - to rotate selected component
39 * w - to wire components
40 * v - to edit component value
41 * F1 - zoom in
42 * F2 - zoom out
43 * F4 - zoom center
44 *
45 * - Layer for KiCad PCB layout hotkets:
46 * m - to move selected component
47 * r - to rotate selected component
48 * x - to route a new track
49 * v - to add a via
50 * F1 - zoom in
51 * F2 - zoom out
52 * F4 - zoom center
53 *
54 */
55
56const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
57 [_SCH] = LAYOUT_ortho_2x4(
58 KC_M, KC_R, KC_W, KC_V,
59 KC_F1, KC_F2, KC_F4, TO(_PCB)
60 ),
61
62 [_PCB] = LAYOUT_ortho_2x4(
63 KC_M, KC_R, KC_X, KC_V,
64 KC_F1, KC_F2, KC_F4, TO(_FN)
65 ),
66
67 [_FN] = LAYOUT_ortho_2x4(
68 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
69 BL_TOGG, BL_STEP, BL_BRTG, TO(_SCH)
70 )
71};
72
73#ifdef OLED_ENABLE
74oled_rotation_t oled_init_user(oled_rotation_t rotation) {
75 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
76}
77
78bool oled_task_user(void) {
79 // Host Keyboard Layer Status
80 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
81 oled_write_P(PSTR("Layer: "), false);
82
83 switch (get_highest_layer(layer_state)) {
84 case _SCH:
85 oled_write_ln_P(PSTR("KiCad Schema"), false);
86 break;
87 case _PCB:
88 oled_write_ln_P(PSTR("KiCad PCB"), false);
89 break;
90 case _FN:
91 oled_write_ln_P(PSTR("FN "), false);
92 break;
93 default:
94 // Or use the write_ln shortcut over adding '\n' to the end of your string
95 oled_write_ln_P(PSTR("N/A"), false);
96 }
97
98 // Host Keyboard LED Status
99 led_t led_state = host_keyboard_led_state();
100 oled_write_P(PSTR("Num Lock: "), false);
101 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
102 oled_write_P(PSTR("Caps Lock: "), false);
103 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
104 oled_write_P(PSTR("Scroll Lock: "), false);
105 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
106 oled_write_P(PSTR("Backlit: "), false);
107 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
108#ifdef RGBLIGHT_ENABLE
109 static char rgbStatusLine1[26] = {0};
110 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
111 oled_write_ln(rgbStatusLine1, false);
112 static char rgbStatusLine2[26] = {0};
113 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
114 oled_write_ln(rgbStatusLine2, false);
115#endif
116 return false;
117}
118#endif
diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c
new file mode 100644
index 000000000..f99a22d72
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c
@@ -0,0 +1,81 @@
1#include QMK_KEYBOARD_H
2
3#define _MAIN 0
4#define _FN 1
5
6#define KC_X0 LT(_FN, KC_ESC)
7
8#ifdef RGBLIGHT_ENABLE
9// How long (in ms) to wait between animation steps for the rainbow mode
10const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15};
11// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations
12const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4};
13#endif
14
15/**
16 * Kodi shortcuts:
17 *
18 * ESC - Previous menu OR Home screen
19 * Enter - Select
20 * X - Stop
21 * Arrows to move
22 *
23 * For details have a look at:
24 * https://kodi.wiki/view/Keyboard_controls
25 */
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 [_MAIN] = LAYOUT_ortho_2x4(
29 KC_ESC, KC_UP, KC_ENTER, KC_X,
30 KC_LEFT, KC_DOWN, KC_RIGHT, MO(_FN)
31 ),
32
33 [_FN] = LAYOUT_ortho_2x4(
34 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
35 BL_TOGG, BL_STEP, BL_BRTG, _______
36 )
37};
38
39#ifdef OLED_ENABLE
40oled_rotation_t oled_init_user(oled_rotation_t rotation) {
41 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
42}
43
44bool oled_task_user(void) {
45 // Host Keyboard Layer Status
46 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
47 oled_write_P(PSTR("Active layer: "), false);
48
49 switch (get_highest_layer(layer_state)) {
50 case _MAIN:
51 oled_write_ln_P(PSTR("Kodi"), false);
52 break;
53 case _FN:
54 oled_write_ln_P(PSTR("FN"), false);
55 break;
56 default:
57 // Or use the write_ln shortcut over adding '\n' to the end of your string
58 oled_write_ln_P(PSTR("N/A"), false);
59 }
60
61 // Host Keyboard LED Status
62 led_t led_state = host_keyboard_led_state();
63 oled_write_P(PSTR("Num Lock: "), false);
64 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
65 oled_write_P(PSTR("Caps Lock: "), false);
66 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
67 oled_write_P(PSTR("Scroll Lock: "), false);
68 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
69 oled_write_P(PSTR("Backlit: "), false);
70 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
71#ifdef RGBLIGHT_ENABLE
72 static char rgbStatusLine1[26] = {0};
73 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
74 oled_write_ln(rgbStatusLine1, false);
75 static char rgbStatusLine2[26] = {0};
76 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
77 oled_write_ln(rgbStatusLine2, false);
78#endif
79 return false;
80}
81#endif
diff --git a/keyboards/anavi/macropad8/keymaps/obs/keymap.c b/keyboards/anavi/macropad8/keymaps/obs/keymap.c
new file mode 100644
index 000000000..1d9fd38ee
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/obs/keymap.c
@@ -0,0 +1,98 @@
1 /* Copyright 2020 Leon Anavi <[email protected]>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19#define _MAIN 0
20#define _FN 1
21
22#define KC_X0 LT(_FN, KC_ESC)
23
24#ifdef RGBLIGHT_ENABLE
25// How long (in ms) to wait between animation steps for the rainbow mode
26const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15};
27// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations
28const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4};
29#endif
30
31/*
32 * This keymap contains the following shortcuts for OBS:
33 *
34 * - Shortcuts useful for switching scenes on the 1st row:
35 * Hold Left Control, Shift, Alt and GUI and press F9
36 * Hold Left Control, Shift, Alt and GUI and press F10
37 * Hold Left Control, Shift, Alt and GUI and press F11
38 * Hold Left Control, Shift, Alt and GUI and press F12
39 * - Center to screen: Ctrl+D
40 * - Fit to screen: Ctrl+F
41 * - Move source to top of sources list: Ctrl+Home
42 */
43
44const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
45 [_MAIN] = LAYOUT_ortho_2x4(
46 HYPR(KC_F9), HYPR(KC_F10), HYPR(KC_F11), HYPR(KC_F12),
47 LCTL(KC_D), LCTL(KC_F), LCTL(KC_HOME), MO(_FN)
48 ),
49
50 [_FN] = LAYOUT_ortho_2x4(
51 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
52 BL_TOGG, BL_STEP, BL_BRTG, _______
53 )
54};
55
56#ifdef OLED_ENABLE
57oled_rotation_t oled_init_user(oled_rotation_t rotation) {
58 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
59}
60
61bool oled_task_user(void) {
62 // Host Keyboard Layer Status
63 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
64 oled_write_P(PSTR("Active layer: "), false);
65
66 switch (get_highest_layer(layer_state)) {
67 case _MAIN:
68 oled_write_ln_P(PSTR("OBS"), false);
69 break;
70 case _FN:
71 oled_write_ln_P(PSTR("FN"), false);
72 break;
73 default:
74 // Or use the write_ln shortcut over adding '\n' to the end of your string
75 oled_write_ln_P(PSTR("N/A"), false);
76 }
77
78 // Host Keyboard LED Status
79 led_t led_state = host_keyboard_led_state();
80 oled_write_P(PSTR("Num Lock: "), false);
81 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
82 oled_write_P(PSTR("Caps Lock: "), false);
83 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
84 oled_write_P(PSTR("Scroll Lock: "), false);
85 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
86 oled_write_P(PSTR("Backlit: "), false);
87 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
88#ifdef RGBLIGHT_ENABLE
89 static char rgbStatusLine1[26] = {0};
90 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
91 oled_write_ln(rgbStatusLine1, false);
92 static char rgbStatusLine2[26] = {0};
93 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
94 oled_write_ln(rgbStatusLine2, false);
95#endif
96 return false;
97}
98#endif
diff --git a/keyboards/anavi/macropad8/keymaps/vlc/keymap.c b/keyboards/anavi/macropad8/keymaps/vlc/keymap.c
new file mode 100644
index 000000000..3e15a8186
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/vlc/keymap.c
@@ -0,0 +1,138 @@
1 /* Copyright 2021 Marc Nause <[email protected]>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19enum custom_layers {
20 _PLAY,
21 _FRAME,
22 _DVD,
23 _FN
24};
25
26#define KC_X0 LT(_FN, KC_ESC)
27
28#ifdef RGBLIGHT_ENABLE
29// How long (in ms) to wait between animation steps for the rainbow mode
30const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15};
31// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations
32const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4};
33#endif
34
35/*
36 * The keymap contains 3 layers for vlc hotkeys and a 4th layer
37 * for controlling the backlighting and the underlighting.
38 *
39 * See https://wiki.videolan.org/QtHotkeys/ for VLC hotkeys
40 *
41 * - Layer for VLC media play hotkeys:
42 * Space - Play/pause
43 * P - Previous track
44 * S - Stop
45 * N - Next track
46 * + - Slower
47 * - - Faster
48 * = - Normal rate
49 *
50 * - Layer for VLC frame control hotkeys:
51 * Shift + right arrow - Jump 5 seconds forward
52 * Alt + right arrow - Jump 10 seconds forward
53 * Control + right arrow - Jump 1 minute forward
54 * E - Next frame
55 * Shift + left arrow - Jump 5 seconds back
56 * Alt + left arrow - Jump 10 seconds back
57 * Control + left arrow - Jump 1 minute back
58 *
59 * - Layer for VLC DVD hotkeys:
60 * Shift + M - Disc menu
61 * Arrow up - Navigate menu (up)
62 * Enter - Select menu entry
63 * Shift + V - Toggle subtitles
64 * Arrow left - Navigate menu (left)
65 * Arrow down - Navigate menu (down)
66 * Arrow right - Navigate menu (right)
67 */
68
69const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
70 [_PLAY] = LAYOUT_ortho_2x4(
71 KC_SPC, KC_P, KC_S, KC_N,
72 KC_KP_PLUS, KC_KP_MINUS, KC_KP_EQUAL, TO(_FRAME)
73 ),
74
75 [_FRAME] = LAYOUT_ortho_2x4(
76 LSFT(KC_RIGHT), LALT(KC_RIGHT), LCTL(KC_RIGHT), KC_E,
77 LSFT(KC_LEFT), LALT(KC_LEFT), LCTL(KC_LEFT), TO(_DVD)
78 ),
79
80 [_DVD] = LAYOUT_ortho_2x4(
81 LSFT(KC_M), KC_UP, KC_ENTER, LSFT(KC_V),
82 KC_LEFT, KC_DOWN, KC_RIGHT, TO(_FN)
83 ),
84
85 [_FN] = LAYOUT_ortho_2x4(
86 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
87 BL_TOGG, BL_STEP, BL_BRTG, TO(_PLAY)
88 )
89};
90
91#ifdef OLED_ENABLE
92oled_rotation_t oled_init_user(oled_rotation_t rotation) {
93 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
94}
95
96void oled_task_user(void) {
97 // Host Keyboard Layer Status
98 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
99 oled_write_P(PSTR("Layer: "), false);
100
101 switch (get_highest_layer(layer_state)) {
102 case _PLAY:
103 oled_write_ln_P(PSTR("VLC Play"), false);
104 break;
105 case _FRAME:
106 oled_write_ln_P(PSTR("VLC Frame"), false);
107 break;
108 case _DVD:
109 oled_write_ln_P(PSTR("VLC DVD"), false);
110 break;
111 case _FN:
112 oled_write_ln_P(PSTR("FN "), false);
113 break;
114 default:
115 // Or use the write_ln shortcut over adding '\n' to the end of your string
116 oled_write_ln_P(PSTR("N/A"), false);
117 }
118
119 // Host Keyboard LED Status
120 led_t led_state = host_keyboard_led_state();
121 oled_write_P(PSTR("Num Lock: "), false);
122 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
123 oled_write_P(PSTR("Caps Lock: "), false);
124 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
125 oled_write_P(PSTR("Scroll Lock: "), false);
126 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
127 oled_write_P(PSTR("Backlit: "), false);
128 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
129#ifdef RGBLIGHT_ENABLE
130 static char rgbStatusLine1[26] = {0};
131 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
132 oled_write_ln(rgbStatusLine1, false);
133 static char rgbStatusLine2[26] = {0};
134 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
135 oled_write_ln(rgbStatusLine2, false);
136#endif
137}
138#endif
diff --git a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c
new file mode 100644
index 000000000..965bbec42
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c
@@ -0,0 +1,97 @@
1 /* Copyright 2020 Leon Anavi <[email protected]>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19#define _MAIN 0
20#define _FN 1
21
22#define KC_X0 LT(_FN, KC_ESC)
23
24#ifdef RGBLIGHT_ENABLE
25// How long (in ms) to wait between animation steps for the rainbow mode
26const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15};
27// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations
28const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4};
29#endif
30
31/*
32 * The keymap contains the following shortcuts for Zoom meeting:
33 *
34 * Alt+V: Start/stop video
35 * Alt+A: Mute/unmute my audio
36 * Alt+M: Mute/unmute audio for everyone except the host
37 * Alt+S: Start/stop screen sharing
38 * Alt+R: Start/stop local recording
39 * Alt+P: Pause/resume recording
40 * Alt+C: Start/stop cloud recording
41 */
42
43const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
44 [_MAIN] = LAYOUT_ortho_2x4(
45 LALT(KC_V), LALT(KC_A), LALT(KC_M), LALT(KC_S),
46 LALT(KC_R), LALT(KC_P), LALT(KC_C), MO(_FN)
47 ),
48
49 [_FN] = LAYOUT_ortho_2x4(
50 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
51 BL_TOGG, BL_STEP, BL_BRTG, _______
52 )
53};
54
55#ifdef OLED_ENABLE
56oled_rotation_t oled_init_user(oled_rotation_t rotation) {
57 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
58}
59
60bool oled_task_user(void) {
61 // Host Keyboard Layer Status
62 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
63 oled_write_P(PSTR("Active layer: "), false);
64
65 switch (get_highest_layer(layer_state)) {
66 case _MAIN:
67 oled_write_ln_P(PSTR("Zoom"), false);
68 break;
69 case _FN:
70 oled_write_ln_P(PSTR("FN"), false);
71 break;
72 default:
73 // Or use the write_ln shortcut over adding '\n' to the end of your string
74 oled_write_ln_P(PSTR("N/A"), false);
75 }
76
77 // Host Keyboard LED Status
78 led_t led_state = host_keyboard_led_state();
79 oled_write_P(PSTR("Num Lock: "), false);
80 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
81 oled_write_P(PSTR("Caps Lock: "), false);
82 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
83 oled_write_P(PSTR("Scroll Lock: "), false);
84 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
85 oled_write_P(PSTR("Backlit: "), false);
86 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
87#ifdef RGBLIGHT_ENABLE
88 static char rgbStatusLine1[26] = {0};
89 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
90 oled_write_ln(rgbStatusLine1, false);
91 static char rgbStatusLine2[26] = {0};
92 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
93 oled_write_ln(rgbStatusLine2, false);
94#endif
95 return false;
96}
97#endif
diff --git a/keyboards/anavi/macropad8/macropad8.c b/keyboards/anavi/macropad8/macropad8.c
new file mode 100644
index 000000000..2859cd042
--- /dev/null
+++ b/keyboards/anavi/macropad8/macropad8.c
@@ -0,0 +1 @@
#include "macropad8.h"
diff --git a/keyboards/anavi/macropad8/macropad8.h b/keyboards/anavi/macropad8/macropad8.h
new file mode 100644
index 000000000..3ebee830d
--- /dev/null
+++ b/keyboards/anavi/macropad8/macropad8.h
@@ -0,0 +1,11 @@
1#pragma once
2
3#include "quantum.h"
4
5#define LAYOUT_ortho_2x4( \
6 k01, k02, k03, k04, \
7 k05, k06, k07, k08 \
8 ) { \
9 { k01, k02, k03, k04 }, \
10 { k05, k06, k07, k08 } \
11}
diff --git a/keyboards/anavi/macropad8/readme.md b/keyboards/anavi/macropad8/readme.md
new file mode 100644
index 000000000..20af44585
--- /dev/null
+++ b/keyboards/anavi/macropad8/readme.md
@@ -0,0 +1,18 @@
1# ANAVI Macro Pad 8
2
3
4ANAVI Macro Pad 8 is an open source mini mechanical keyboard with 8 keys, backlit, addressable RGB WS2812B LED strip on the back and mini OLED display. Powered by ATmega32U4 microcontroller and with microUSB connector.
5
6* Keyboard Maintainer: [Leon Anavi](https://github.com/leon-anavi)
7* Hardware Supported: ANAVI Macro Pad 8
8* Hardware Availability: [PCB Files](https://github.com/AnaviTechnology/anavi-macro-pad-8)
9
10Make example for this keyboard (after setting up your build environment):
11
12 qmk compile -kb anavi/macropad8 -km default
13
14Flash to ANAVI Macro Pad 8:
15
16 qmk flash -kb anavi/macropad8 -km default
17
18See 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).
diff --git a/keyboards/anavi/macropad8/rules.mk b/keyboards/anavi/macropad8/rules.mk
new file mode 100644
index 000000000..c0f0e7f85
--- /dev/null
+++ b/keyboards/anavi/macropad8/rules.mk
@@ -0,0 +1,20 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15NKRO_ENABLE = yes # Enable N-Key Rollover
16BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
17AUDIO_ENABLE = no # Audio output
18RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
19OLED_ENABLE = yes
20OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C