Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmandourah authored Nov 29, 2021
1 parent efd4f86 commit d27fed2
Show file tree
Hide file tree
Showing 10 changed files with 386 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qmk/ladis/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif
60 changes: 60 additions & 0 deletions qmk/ladis/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#ifndef CONFIG_H
#define CONFIG_H

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Ladis
#define PRODUCT LadisPad
#define DESCRIPTION macropad

/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 11

/* key matrix pins */
#define DIRECT_PINS { { D3, B1, D4, C6, D7, E6, B4, B5, F4, F7, B3 } }
#define UNUSED_PINS

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* number of backlight levels */

#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 0
#endif

/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)

/* prevent stuck modifiers */
#define PREVENT_STUCK_MODIFIERS


#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 0
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

#endif

#define ENCODERS_PAD_A { F5, B6 }
#define ENCODERS_PAD_B { F6, B2 }
72 changes: 72 additions & 0 deletions qmk/ladis/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
//#include "ladis.h"
#include QMK_KEYBOARD_H

#define _BL 0
#define _FL 1

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_BL] = LAYOUT(
KC_WWW_BACK, KC_UP, KC_WWW_FORWARD, \
KC_LEFT, KC_DOWN, KC_RIGHT, \
MO(_FL), KC_WWW_REFRESH, KC_F16, \
LCTL(KC_LGUI), KC_MUTE),

[_FL] = LAYOUT(
KC_F17, KC_F18, KC_F19, \
KC_F20, KC_F21, KC_F22, \
KC_NO, KC_F23, KC_F24, \
KC_SYSTEM_SLEEP, KC_MUTE),

};

bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise & layer_state_is(_BL)) {
tap_code(KC_RIGHT);
} else if (clockwise & layer_state_is(_FL)){
tap_code(KC_MS_WH_DOWN);
}
else if (!clockwise & layer_state_is(_BL)){
tap_code(KC_LEFT);
}
else if (!clockwise & layer_state_is(_FL)) {
tap_code(KC_MS_WH_UP);
}
} else if (index == 1) { /* Second encoder */
if (clockwise & layer_state_is(_BL)) {
tap_code(KC_AUDIO_VOL_UP);
} else if (clockwise & layer_state_is(_FL)){
tap_code(KC_MS_WH_RIGHT);
}

else if (!clockwise & layer_state_is(_BL)){
tap_code(KC_AUDIO_VOL_DOWN);
}
else if (!clockwise & layer_state_is(_FL)) {
tap_code(KC_MS_WH_LEFT);
}
}
return false;
}

static void render_logo(void) {
static const char PROGMEM raw_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,127,255,255,255,255,255, 31, 15, 7, 7, 7, 3, 3, 3, 3, 3, 7, 7, 7, 15, 63,255,255,255,255,255,255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,224,224,240,112,112,240,240,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,240,240,192, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,127,255,255,255,255,254,252,252,252,252,124, 56,124,252,252,252,254,254,254,255,255,255,255, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 1,192,248,255,255, 15, 1,128,192,224,224,240,112,176, 32, 0, 0, 0,128,192,224,240,112, 48, 32,224,252,255,127, 7,192,240,231, 7, 7,224,224,240, 48, 48,240,224, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255,223,135,135,191,248,112,112,187,135, 7,135,143,255,255,255,255,251,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,192,224,252,255,191,135, 0, 16,254,255,199,227,112, 60,254,255, 63, 6, 0,126,255,255,195,240, 56,124,255,255, 31, 3, 32,252,255, 63, 7,112,240,225,199,207,255,252,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,255,255,255,255,255,255,255,255,255,253,253,253,252,252,253,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 7, 7, 15, 14, 30, 30, 28, 28, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
oled_write_raw_P(raw_logo, sizeof(raw_logo));
}


void oled_task_user(void) {
if (is_keyboard_master()) {
// If you want to put your image on the master side, put your function call here:
render_logo();
} else {
// And if you want to put your image on the slave side, put it here instead:
render_logo();
}
}
84 changes: 84 additions & 0 deletions qmk/ladis/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
//#include "ladis.h"
#include QMK_KEYBOARD_H

#define _BL 0
#define _FL 1

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_BL] = LAYOUT(
KC_WWW_BACK, KC_UP, KC_WWW_FORWARD, \
KC_LEFT, KC_DOWN, KC_RIGHT, \
MO(_FL), KC_WWW_REFRESH, KC_F16, \
LCTL(KC_LGUI), KC_MUTE),

[_FL] = LAYOUT(
KC_F17, KC_F18, KC_F19, \
KC_F20, KC_F21, KC_F22, \
KC_NO, KC_F23, KC_F24, \
KC_SYSTEM_SLEEP, KC_MUTE),

[2] = LAYOUT(
KC_TRNS , KC_TRNS , KC_TRNS , \
KC_TRNS , KC_TRNS , KC_TRNS , \
KC_TRNS , KC_TRNS , KC_TRNS , \
KC_TRNS , KC_TRNS ),

[3] = LAYOUT(
KC_TRNS , KC_TRNS , KC_TRNS , \
KC_TRNS , KC_TRNS , KC_TRNS , \
KC_TRNS , KC_TRNS , KC_TRNS , \
KC_TRNS , KC_TRNS ),

};

bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise & layer_state_is(_BL)) {
tap_code(KC_RIGHT);
} else if (clockwise & layer_state_is(_FL)){
tap_code(KC_MS_WH_DOWN);
}
else if (!clockwise & layer_state_is(_BL)){
tap_code(KC_LEFT);
}
else if (!clockwise & layer_state_is(_FL)) {
tap_code(KC_MS_WH_UP);
}
} else if (index == 1) { /* Second encoder */
if (clockwise & layer_state_is(_BL)) {
tap_code(KC_AUDIO_VOL_UP);
} else if (clockwise & layer_state_is(_FL)){
tap_code(KC_MS_WH_RIGHT);
}

else if (!clockwise & layer_state_is(_BL)){
tap_code(KC_AUDIO_VOL_DOWN);
}
else if (!clockwise & layer_state_is(_FL)) {
tap_code(KC_MS_WH_LEFT);
}
}
return false;
}

static void render_logo(void) {
static const char PROGMEM raw_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,127,255,255,255,255,255, 31, 15, 7, 7, 7, 3, 3, 3, 3, 3, 7, 7, 7, 15, 63,255,255,255,255,255,255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,224,224,240,112,112,240,240,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,240,240,192, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,127,255,255,255,255,254,252,252,252,252,124, 56,124,252,252,252,254,254,254,255,255,255,255, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 1,192,248,255,255, 15, 1,128,192,224,224,240,112,176, 32, 0, 0, 0,128,192,224,240,112, 48, 32,224,252,255,127, 7,192,240,231, 7, 7,224,224,240, 48, 48,240,224, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255,223,135,135,191,248,112,112,187,135, 7,135,143,255,255,255,255,251,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,192,224,252,255,191,135, 0, 16,254,255,199,227,112, 60,254,255, 63, 6, 0,126,255,255,195,240, 56,124,255,255, 31, 3, 32,252,255, 63, 7,112,240,225,199,207,255,252,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,255,255,255,255,255,255,255,255,255,253,253,253,252,252,253,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 7, 7, 15, 14, 30, 30, 28, 28, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
oled_write_raw_P(raw_logo, sizeof(raw_logo));
}


void oled_task_user(void) {
if (is_keyboard_master()) {
// If you want to put your image on the master side, put your function call here:
render_logo();
} else {
// And if you want to put your image on the slave side, put it here instead:
render_logo();
}
}
33 changes: 33 additions & 0 deletions qmk/ladis/keymaps/via/ladis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Ladispad",
"vendorId": "0xFEED",
"productId": "0x6060",
"lighting": "none",
"matrix": {
"rows": 1,
"cols": 11
},
"layouts": {
"keymap": [
["0,0", "0,1", "0,2"],
[
"0,3",
"0,4",
"0,5",
{
"x": 1
},
"0,9"
],
[
"0,6",
"0,7",
"0,8",
{
"x": 1
},
"0,10"
]
]
}
}
59 changes: 59 additions & 0 deletions qmk/ladis/keymaps/via/ladispad.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "Ladispad",
"vendorProductId": 4276969568,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_WWW_BACK",
"KC_UP",
"KC_WWW_FORWARD",
"KC_LEFT",
"KC_DOWN",
"KC_RGHT",
"MO(1)",
"KC_WWW_REFRESH",
"KC_F16",
"C(KC_LGUI)",
"KC_MUTE"
],
[
"KC_F17",
"KC_F18",
"KC_F19",
"KC_F20",
"KC_F21",
"KC_F22",
"KC_NO",
"KC_F23",
"KC_F24",
"KC_SLEP",
"KC_MUTE"
],
[
"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_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS"
]
]
}
1 change: 1 addition & 0 deletions qmk/ladis/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VIA_ENABLE = yes
1 change: 1 addition & 0 deletions qmk/ladis/ladis.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "ladis.h"
14 changes: 14 additions & 0 deletions qmk/ladis/ladis.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef KB_H
#define KB_H

#include "quantum.h"



#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10 } \
}

#endif
Loading

0 comments on commit d27fed2

Please sign in to comment.