Browse Source

Tidy use of raw hid within keyboards (#23557)

pull/23564/head
Joel Challis 2 weeks ago
committed by GitHub
parent
commit
1513966c38
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
11 changed files with 21 additions and 112 deletions
  1. +0
    -24
      keyboards/dp60/dp60.c
  2. +20
    -0
      keyboards/dp60/keymaps/via/keymap.c
  3. +0
    -2
      keyboards/evyd13/plain60/keymaps/rgb/rules.mk
  4. +1
    -2
      keyboards/hs60/v1/keyboard.json
  5. +0
    -4
      keyboards/hs60/v1/rules.mk
  6. +0
    -74
      keyboards/hs60/v1/v1.c
  7. +0
    -1
      keyboards/keychron/q6/iso/rules.mk
  8. +0
    -1
      keyboards/keychron/q6/iso_encoder/rules.mk
  9. +0
    -1
      keyboards/massdrop/alt/rules.mk
  10. +0
    -1
      keyboards/massdrop/ctrl/rules.mk
  11. +0
    -2
      keyboards/rocketboard_16/rules.mk

+ 0
- 24
keyboards/dp60/dp60.c View File

@ -172,27 +172,3 @@ webusb_pos_t webusb_keymap[] = {
{4, 0}, {4, 1}, {4, 2}, {4, 6}, {4, 10}, {4, 11}, {4, 12}, {4, 13},
};
#endif
#ifndef RAW_ENABLE
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
#else
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
if (record->event.pressed) {
switch(keycode) {
#ifdef RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
case KC_F13: // toggle rgb matrix
rgb_matrix_toggle();
return false;
case KC_F14:
rgb_matrix_step();
return false;
#endif
#endif
default:
break;
}
}
return true;
}

+ 20
- 0
keyboards/dp60/keymaps/via/keymap.c View File

@ -44,3 +44,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______, _______, _______,_______,_______,_______)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
#ifdef RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
case KC_F13: // toggle rgb matrix
rgb_matrix_toggle();
return false;
case KC_F14:
rgb_matrix_step();
return false;
#endif
#endif
default:
break;
}
}
return true;
}

+ 0
- 2
keyboards/evyd13/plain60/keymaps/rgb/rules.mk View File

@ -1,3 +1 @@
RGBLIGHT_ENABLE = yes
RAW_ENABLE = no
DYNAMIC_KEYMAP_ENABLE = no

+ 1
- 2
keyboards/hs60/v1/keyboard.json View File

@ -73,8 +73,7 @@
"mousekey": false,
"extrakey": true,
"nkro": true,
"rgb_matrix": true,
"raw": true
"rgb_matrix": true
},
"community_layouts": ["60_ansi", "60_iso"],
"layouts": {


+ 0
- 4
keyboards/hs60/v1/rules.mk View File

@ -2,7 +2,3 @@
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Experimental features for zealcmd please do no enable
#RAW_ENABLE = yes
#USE_KEYMAPS_IN_EEPROM = yes

+ 0
- 74
keyboards/hs60/v1/v1.c View File

@ -15,80 +15,6 @@
*/
#include "quantum.h"
// Please ignore this is for upcoming features
/*#ifdef RAW_ENABLE
void raw_hid_receive( uint8_t *data, uint8_t length )
{
uint8_t command = data[0];
switch ( command )
{
case id_protocol_version:
{
msg_protocol_version *msg = (msg_protocol_version*)&data[1];
msg->version = PROTOCOL_VERSION;
break;
}
#if USE_KEYMAPS_IN_EEPROM
case id_keymap_keycode_load:
{
msg_keymap_keycode_load *msg = (msg_keymap_keycode_load*)&data[1];
msg->keycode = keymap_keycode_load( msg->layer, msg->row, msg->column );
break;
}
case id_keymap_keycode_save:
{
msg_keymap_keycode_save *msg = (msg_keymap_keycode_save*)&data[1];
keymap_keycode_save( msg->layer, msg->row, msg->column, msg->keycode);
break;
}
case id_keymap_default_save:
{
keymap_default_save();
break;
}
#endif // USE_KEYMAPS_IN_EEPROM
case id_backlight_config_set_values:
{
msg_backlight_config_set_values *msg = (msg_backlight_config_set_values*)&data[1];
backlight_config_set_values(msg);
backlight_config_save();
break;
}
case id_backlight_config_set_alphas_mods:
{
msg_backlight_config_set_alphas_mods *msg = (msg_backlight_config_set_alphas_mods*)&data[1];
backlight_config_set_alphas_mods( msg->alphas_mods );
backlight_config_save();
break;
}
case id_backlight_set_key_color:
{
msg_backlight_set_key_color *msg = (msg_backlight_set_key_color*)&data[1];
backlight_set_key_color(msg->row, msg->column, msg->hsv);
break;
}
case id_system_get_state:
{
msg_system_state *msg = (msg_system_state*)&data[1];
msg->value = backlight_get_tick();
break;
}
default:
{
// Unhandled message.
data[0] = id_unhandled;
break;
}
}
// Return same buffer with values changed
raw_hid_send( data, length );
}
#endif*/
#ifdef HS60_ANSI
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {


+ 0
- 1
keyboards/keychron/q6/iso/rules.mk View File

@ -12,7 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RAW_ENABLE = yes
LTO_ENABLE = yes
# custom matrix setup


+ 0
- 1
keyboards/keychron/q6/iso_encoder/rules.mk View File

@ -13,7 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RAW_ENABLE = yes
LTO_ENABLE = yes
# custom matrix setup


+ 0
- 1
keyboards/massdrop/alt/rules.mk View File

@ -21,7 +21,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
# Custom RGB matrix handling


+ 0
- 1
keyboards/massdrop/ctrl/rules.mk View File

@ -21,7 +21,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
# Custom RGB matrix handling


+ 0
- 2
keyboards/rocketboard_16/rules.mk View File

@ -3,5 +3,3 @@ MCU_LDSCRIPT = STM32F103xB
# Extra include
SRC += keycode_lookup.c
RAW_ENABLE = yes # Enables HID RAW communication between the board and the PC

Loading…
Cancel
Save