-
-
Notifications
You must be signed in to change notification settings - Fork 40.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
MIIIW BlackIO98 & BlackIO83 #18343
MIIIW BlackIO98 & BlackIO83 #18343
Conversation
参考Keychron Q1和sets3n kk980增加对应文件。
Rehost images on Imgur.
Rehost images on Imgur.
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.
Fixed all changes metioned by zvecr.
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.
Done, finished all changes.
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.
Changed according to suggestion.
Dear Jouke,
We have fixed these codes and commited, pls review. Thanks!
Johnny
2022-10-11
------------------ Original ------------------
From: ***@***.***>;
Date: Sun, Oct 9, 2022 11:31 PM
To: ***@***.***>;
Cc: ***@***.***>; ***@***.***>;
Subject: Re: [qmk/qmk_firmware] MIIIW BlackIO98 & BlackIO83 (PR #18343)
@joukewitteveen commented on this pull request.
In keyboards/miiiw/blackio83/blackio83.c:
> + loop10hz_token = defer_exec(LOOP_10HZ_PERIOD, loop_10Hz, NULL); +} + +bool led_update_kb(led_t led_state) { + writePinLow(MWPROTO_WAKEUP_PIN); + if(readPin(MWPROTO_STATUS_PIN)) + wait_us(500); + else + wait_us(1500); + sdPutI(&MWPROTO_DRIVER, 0xA5); + sdPutI(&MWPROTO_DRIVER, 0x61); + sdPutI(&MWPROTO_DRIVER, 0x01); + sdPutI(&MWPROTO_DRIVER, led_state.raw); + sdPutI(&MWPROTO_DRIVER, 0xC5 ^ led_state.raw); + writePinHigh(MWPROTO_WAKEUP_PIN); + return false; // prevent keyboard from processing state
Normally, the return value of led_update_kb is not checked (quantum/led.c:led_set). What I believe you really want here, after #14452, is a function void led_update_ports.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Dear Drashna,
We have fixed these codes and commited, pls review. Thanks!
Johnny
2022-10-11
------------------ Original ------------------
From: ***@***.***>;
Date: Mon, Oct 10, 2022 03:27 PM
To: ***@***.***>;
Cc: ***@***.***>; ***@***.***>;
Subject: Re: [qmk/qmk_firmware] MIIIW BlackIO98 & BlackIO83 (PR #18343)
@drashna requested changes on this pull request.
In keyboards/miiiw/blackio83/keymaps/default/keymap.c:
> +// Implement Super-alt↯tab +// See https://docs.qmk.fm/#/feature_macros?id=super-alt↯tab +static bool is_alt_tab_active = false; +static uint32_t alt_tab_timer = 0; + +#ifdef DIP_SWITCH_ENABLE +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 2: + default_layer_set(1UL << (active ? WIN_BL : MAC_BL)); + break; + } + return true; +} +#endif + +// Processing all the key pressed. +// Alt+tab. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint8_t shift_mods = get_mods() & MOD_MASK_SHIFT; + switch (keycode) { // This will do most of the grunt work with the keycodes. + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read32(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + return false; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgb_matrix_default(); + } + return false; + case RGB_VAI: + if(shift_mods) { + if (record->event.pressed) rgb_matrix_increase_speed(); + return false; + } + break; + case RGB_VAD: + if(shift_mods) { + if (record->event.pressed && rgb_matrix_get_speed() >= RGB_MATRIX_SPD_STEP) rgb_matrix_decrease_speed(); + return false; + } + break; + case RGB_MOD: + if(shift_mods) { + if (record->event.pressed) rgb_matrix_increase_hue(); + return false; + } + break; + case RGB_RMOD: + if(shift_mods) { + if (record->event.pressed) rgb_matrix_decrease_hue(); + return false; + } + break; + } + + return true; +} + +void matrix_scan_user(void) { // The very important timer. + if (is_alt_tab_active && timer_elapsed32(alt_tab_timer) > 750) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } +}
Could you please remove this. We want the default keymaps to be as plain and simple as possible, as this is what is cloned when qmk new-keymap is ran.
Additionally, it looks like a lot of the added keycodes don't actually replace functionality.
And it is fine to have a "stock" keymap with additional functionality.
️ Suggested change -// Implement Super-alt↯tab -// See https://docs.qmk.fm/#/feature_macros?id=super-alt↯tab -static bool is_alt_tab_active = false; -static uint32_t alt_tab_timer = 0; - -#ifdef DIP_SWITCH_ENABLE -bool dip_switch_update_user(uint8_t index, bool active) { - switch (index) { - case 2: - default_layer_set(1UL << (active ? WIN_BL : MAC_BL)); - break; - } - return true; -} -#endif - -// Processing all the key pressed. -// Alt+tab. -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - uint8_t shift_mods = get_mods() & MOD_MASK_SHIFT; - switch (keycode) { // This will do most of the grunt work with the keycodes. - case ALT_TAB: - if (record->event.pressed) { - if (!is_alt_tab_active) { - is_alt_tab_active = true; - register_code(KC_LALT); - } - alt_tab_timer = timer_read32(); - register_code(KC_TAB); - } else { - unregister_code(KC_TAB); - } - return false; - case RGB_RST: - if (record->event.pressed) { - eeconfig_update_rgb_matrix_default(); - } - return false; - case RGB_VAI: - if(shift_mods) { - if (record->event.pressed) rgb_matrix_increase_speed(); - return false; - } - break; - case RGB_VAD: - if(shift_mods) { - if (record->event.pressed && rgb_matrix_get_speed() >= RGB_MATRIX_SPD_STEP) rgb_matrix_decrease_speed(); - return false; - } - break; - case RGB_MOD: - if(shift_mods) { - if (record->event.pressed) rgb_matrix_increase_hue(); - return false; - } - break; - case RGB_RMOD: - if(shift_mods) { - if (record->event.pressed) rgb_matrix_decrease_hue(); - return false; - } - break; - } - - return true; -} - -void matrix_scan_user(void) { // The very important timer. - if (is_alt_tab_active && timer_elapsed32(alt_tab_timer) > 750) { - unregister_code(KC_LALT); - is_alt_tab_active = false; - } -}
In keyboards/miiiw/blackio83/keymaps/via/keymap.c:
> + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FL), KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap MAC_FL: Mac Function Layer + */ + [MAC_FL] = LAYOUT( + RGB_RST, 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_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD + ), +}; + +// Implement Super-alt↯tab
same.
In keyboards/miiiw/blackio83/readme.md:
> +![BlackIO83](https://i.imgur.com/jZ7HrTC.jpg) +![BlackIO83](https://i.imgur.com/AnlUIfp.jpg) ️ Suggested change -![BlackIO83](https://i.imgur.com/jZ7HrTC.jpg) -![BlackIO83](https://i.imgur.com/AnlUIfp.jpg) +![BlackIO83](https://i.imgur.com/jZ7HrTCh.jpg) +![BlackIO83](https://i.imgur.com/AnlUIfph.jpg)
In keyboards/miiiw/blackio98/keymaps/default/keymap.c:
> + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FL), KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + + /* Keymap MAC_FL: Mac Function Layer + */ + [MAC_FL] = LAYOUT( + RGB_RST, 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_PSCR, KC_HOME, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______, _______ + ), +}; + +// Implement Super-alt↯tab
same
In keyboards/miiiw/blackio98/keymaps/via/keymap.c:
> + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FL), KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + + /* Keymap MAC_FL: Mac Function Layer + */ + [MAC_FL] = LAYOUT( + RGB_RST, 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_PSCR, KC_HOME, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______, _______ + ), +}; + +// Implement Super-alt↯tab
same
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thank you for your contribution! |
Thank you for your contribution! |
Thank you for your contribution! |
Add new keyboards BlackIO98 & BlackIO83, this is the first commit to QMK respository of MIIIW.
Description
Types of Changes
Issues Fixed or Closed by This PR
Checklist