-
-
Notifications
You must be signed in to change notification settings - Fork 37.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Aplusx Pulsar XBOARD QS keyboard #23756
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can rename this to keyboard.json
, and remove the rules.mk file.
enum pulsar_keycodes { | ||
KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum pulsar_keycodes { | |
KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock | |
}; |
|
||
//----------------------------------------------------------------------------- | ||
|
||
#ifdef RGB_MATRIX_ENABLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be moved to the keyboard's c file (and that file created)
enum _layer { WIN_BASE = 0, WIN_FN, MAC_BASE, MAC_FN }; | ||
|
||
enum pulsar_keycodes { | ||
KC_TGUI = QK_KB_0, // Ver 0.21.6에서 변경 (USER00,) // Toggle between GUI Lock or Unlock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a keyboard keycode, not a keymap/user keycode.
KC_TGUI = QK_KB_0, // Ver 0.21.6에서 변경 (USER00,) // Toggle between GUI Lock or Unlock | |
KC_TGUI = QK_USER_0, // Ver 0.21.6에서 변경 (USER00,) // Toggle between GUI Lock or Unlock |
void kvm_switch(bool pc_num){ | ||
writePinHigh(GPIO_KM_OE); | ||
writePinLow(GPIO_KM_PWEN); | ||
if (!pc_num) writePinLow(GPIO_KM_SEL); | ||
else writePinHigh(GPIO_KM_SEL); | ||
writePinLow(GPIO_KM_OE); | ||
|
||
kvm_timer = timer_read(); | ||
kvm_sel_on = true; | ||
}; | ||
|
||
void keyboard_pre_init_user(void) { | ||
setPinOutput(GPIO_KM_OE); // H/W power on default = 0 | ||
setPinOutput(GPIO_KM_SEL); // H/W power on default = 0 | ||
setPinOutput(GPIO_KM_PWEN); // H/W power on default = 1 | ||
} | ||
|
||
void keyboard_post_init_user(void) { | ||
user_config.raw = eeconfig_read_user(); // Read the user config from EEPROM | ||
kvm_pc_sel = user_config.eeprom_kvm_pc_sel; | ||
kvm_switch(kvm_pc_sel); | ||
|
||
Status_LED_Bright = user_config.eeprom_Status_LED_Bright; // 0 = 초기값, 1~5 = 50~250의 5단계 밝기 | ||
if (Status_LED_Bright == 0) Status_LED_Bright = 5; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code should exist at the kb level, not the keymap.
return false; | ||
} | ||
else{ | ||
INIT3S_on = false; | ||
return false; | ||
} | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return false; | |
} | |
else{ | |
INIT3S_on = false; | |
return false; | |
} | |
break; | |
} | |
else{ | |
INIT3S_on = false; | |
} | |
break; |
case KC_LOPTN: | ||
case KC_ROPTN: | ||
case KC_LCMMD: | ||
case KC_RCMMD: | ||
if (record->event.pressed) { | ||
register_code(mac_keycode[keycode - KC_LOPTN]); | ||
} else { | ||
unregister_code(mac_keycode[keycode - KC_LOPTN]); | ||
} | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a poor implementation of the magic functionality.
https://docs.qmk.fm/keycodes_magic
And specifically, the Alt-GUI swap functionality
|
||
case KC_TMODE: | ||
if (record->event.pressed) { | ||
switch (get_highest_layer(layer_state|default_layer_state)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so ....
if (get_highest_layer(layer_state|default_layer_state) >= 2) {
// not mac mode
} else {
// is mac mode
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Via keymap should be plain and simple. Most of this code is either replicating core functionality, or is code that should absolutely not be implemented at the keymap level and should be at the kb level.
Description
This is a PR to add the keyboard "Aplusx, PULSAR XBOARD QS" to QMK.
Thank you for taking the time to review this submission
Types of Changes
Issues Fixed or Closed by This PR
Checklist