-
-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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 crkbd keymap by manna harbour #9461
Conversation
d627a41
to
651dfba
Compare
All of the prerequisite PRs have now been merged and this is now ready for review. Thanks! |
Thanks @drashna! |
This keymap includes crkbd-specific hardware feature support. It provides easy selection of the following: - hotswap trackpoint module in OLED port, or OLED with new or old drivers - automatic mouse buttons layer activation on trackpoint movement - keyboard-side mouse acceleration, or low rates for use with host-side acceleration - static image display, or use as caps lock indicator - built-in logo, or image from data file, with automatic rotation - automatic conversion of image files - matrix, light, or underglow RGB It imports miryoku, an ergonomic, minimal, orthogonal layout for ergo or ortho keyboards.
#if defined SSD1306OLED | ||
#include "ssd1306.h" | ||
#endif |
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.
Ideally, the SSD1306OLED
code shouldn't be used, at all. Instead, the oled driver feature should be used in its placen
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.
#if defined SSD1306OLED | |
#include "ssd1306.h" | |
#endif |
Can we also get GPL2+ compatible copyright headers on all source files, please? |
@@ -0,0 +1,98 @@ | |||
// https://github.com/manna-harbour/qmk_firmware/blob/crkbd/keyboards/crkbd/keymaps/manna-harbour/readme.org |
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.
Could you add a GPL2+ compatible license header here?
For instance:
// Copyright 2021 Your Name (@yourgithub)
// SPDX-License-Identifier: GPL-2.0-or-later
Or
qmk_firmware/data/templates/base/keyboard.c
Lines 1 to 15 in 6b299fa
/* Copyright %YEAR% %YOUR_NAME% | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* | |
* You should have received a copy of the GNU General Public License | |
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |
*/ |
#if defined RGB_MATRIX_ENABLE | ||
#define RGB_MATRIX_KEYPRESSES | ||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true |
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.
#define RGB_DISABLE_WHEN_USB_SUSPENDED true | |
#define RGB_DISABLE_WHEN_USB_SUSPENDED |
#define RGBLIGHT_HUE_STEP 8 | ||
#define RGBLIGHT_SAT_STEP 8 | ||
#define RGBLIGHT_VAL_STEP 8 | ||
#define RGBLIGHT_ANIMATIONS |
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.
Could you explicitly define which animations are enabled?
#define RGBLIGHT_ANIMATIONS | |
#define RGBLIGHT_EFFECT_BREATHING | |
#define RGBLIGHT_EFFECT_RAINBOW_MOOD | |
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL | |
#define RGBLIGHT_EFFECT_SNAKE | |
#define RGBLIGHT_EFFECT_KNIGHT | |
#define RGBLIGHT_EFFECT_CHRISTMAS | |
#define RGBLIGHT_EFFECT_STATIC_GRADIENT | |
#define RGBLIGHT_EFFECT_RGB_TEST | |
#define RGBLIGHT_EFFECT_ALTERNATING | |
#define RGBLIGHT_EFFECT_TWINKLE |
@@ -0,0 +1,181 @@ | |||
// https://github.com/manna-harbour/qmk_firmware/blob/crkbd/keyboards/crkbd/keymaps/manna-harbour/readme.org |
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.
Could you add a GPL2+ compatible license header here?
For instance:
// Copyright 2021 Your Name (@yourgithub)
// SPDX-License-Identifier: GPL-2.0-or-later
Or
qmk_firmware/data/templates/base/keyboard.c
Lines 1 to 15 in 6b299fa
/* Copyright %YEAR% %YOUR_NAME% | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* | |
* You should have received a copy of the GNU General Public License | |
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |
*/ |
#if defined SSD1306OLED | ||
#include "ssd1306.h" | ||
#endif |
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.
#if defined SSD1306OLED | |
#include "ssd1306.h" | |
#endif |
#endif // defined MH_OLED_IMAGE_FILE && defined OLED_DRIVER_ENABLE | ||
|
||
|
||
#if defined OLED_DRIVER_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.
#if defined OLED_DRIVER_ENABLE | |
#if defined OLED_ENABLE |
#if defined SSD1306OLED | ||
|
||
const char *read_logo(void); | ||
|
||
void matrix_init_user(void) { | ||
iota_gfx_init(!isLeftHand); | ||
} | ||
|
||
void matrix_render_user(struct CharacterMatrix *matrix) { | ||
#if defined MH_OLED_MODE_STATIC | ||
matrix_write(matrix, read_logo()); | ||
#elif defined MH_OLED_MODE_CAPS | ||
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { | ||
matrix_write(matrix, read_logo()); | ||
} | ||
#endif // defined MH_OLED_MODE_CAPS | ||
} | ||
|
||
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { | ||
if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
memcpy(dest->display, source->display, sizeof(dest->display)); | ||
dest->dirty = true; | ||
} | ||
} | ||
|
||
void iota_gfx_task_user(void) { | ||
struct CharacterMatrix matrix; | ||
matrix_clear(&matrix); | ||
matrix_render_user(&matrix); | ||
matrix_update(&display, &matrix); | ||
} | ||
|
||
void matrix_scan_user(void) { | ||
iota_gfx_task(); | ||
} | ||
|
||
#endif // defined SSD1306OLED |
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.
#if defined SSD1306OLED | |
const char *read_logo(void); | |
void matrix_init_user(void) { | |
iota_gfx_init(!isLeftHand); | |
} | |
void matrix_render_user(struct CharacterMatrix *matrix) { | |
#if defined MH_OLED_MODE_STATIC | |
matrix_write(matrix, read_logo()); | |
#elif defined MH_OLED_MODE_CAPS | |
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { | |
matrix_write(matrix, read_logo()); | |
} | |
#endif // defined MH_OLED_MODE_CAPS | |
} | |
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { | |
if (memcmp(dest->display, source->display, sizeof(dest->display))) { | |
memcpy(dest->display, source->display, sizeof(dest->display)); | |
dest->dirty = true; | |
} | |
} | |
void iota_gfx_task_user(void) { | |
struct CharacterMatrix matrix; | |
matrix_clear(&matrix); | |
matrix_render_user(&matrix); | |
matrix_update(&display, &matrix); | |
} | |
void matrix_scan_user(void) { | |
iota_gfx_task(); | |
} | |
#endif // defined SSD1306OLED |
|
||
OPT_DEFS += -DMH_USER_NAME_H=\"$(USER_NAME).h\" | ||
|
||
ifeq ($(strip $(MH_MODULE)), trackpoint) |
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.
All of this should probably go in post_rules.mk
@@ -0,0 +1,40 @@ | |||
// https://github.com/manna-harbour/qmk_firmware/blob/crkbd/keyboards/crkbd/keymaps/manna-harbour/readme.org |
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.
Could you add a GPL2+ compatible license header here?
For instance:
// Copyright 2021 Your Name (@yourgithub)
// SPDX-License-Identifier: GPL-2.0-or-later
Or
qmk_firmware/data/templates/base/keyboard.c
Lines 1 to 15 in 6b299fa
/* Copyright %YEAR% %YOUR_NAME% | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* | |
* You should have received a copy of the GNU General Public License | |
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |
*/ |
@@ -0,0 +1,40 @@ | |||
// https://github.com/manna-harbour/qmk_firmware/blob/crkbd/keyboards/crkbd/keymaps/manna-harbour/readme.org |
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.
Could you add a GPL2+ compatible license header here?
For instance:
// Copyright 2021 Your Name (@yourgithub)
// SPDX-License-Identifier: GPL-2.0-or-later
Or
qmk_firmware/data/templates/base/keyboard.c
Lines 1 to 15 in 6b299fa
/* Copyright %YEAR% %YOUR_NAME% | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* | |
* You should have received a copy of the GNU General Public License | |
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |
*/ |
@manna-harbour in the spirit of tidying up, does this PR still need to remain open, or does your current mechanism fulfil all needs? IMO the latter is true. |
Thanks @drashna and @tzarc for the review. This PR is now very out of date, and I've found a different method of adding custom code to any keymap at manna-harbour#40, which should be much better than the As an aside, there was 12 months between @drashna's original approval and request for review, and the next review. There may be an issue with the use of the Thanks @keyboard-magpie for the reminder. The Miryoku customisation method is separate from this, but even so, this PR is now obsolete. Closing now. |
This keymap includes crkbd-specific hardware feature support. It provides easy selection of the following:
It imports miryoku, an ergonomic, minimal, orthogonal layout for ergo or ortho keyboards.
Description
This PR depends on the following open PRs:
Add movement hook to ps2_mouse #8805 "Add movement hook to ps2_mouse" to build with make argument MH_AUTO_BUTTONS=yes[now merged]Update miryoku #9442 "Update miryoku" to build with the default imported keymap[now merged]This PR would benefit from the following open PRs:
Fix sharing of mouse button state from mousekeys to ps2_mouse #9124 "Fix sharing of mouse button state from mousekeys to ps2_mouse" to eliminate extra mouse button clicks when building with make argument MH_AUTO_BUTTONS=yes[now merged]This PR provides solutions or work-arounds for the following closed issues:
This PR provides enhancements to the following closed PRs:
Types of Changes
Checklist