-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
A fancy keymap for the wt65_xt. #19375
Conversation
TODO: Extract a lot of this logic and make it more widely usable for polyglot keyboards!
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once |
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 there is nothing here, then this file can (and should) be removed.
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.
*/ | ||
#include QMK_KEYBOARD_H | ||
#include <assert.h> | ||
#include "wt65_xt.h" |
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.
Isn't needed. QMK_KEYBOARD_H
is generated as this, already.
#include "wt65_xt.h" |
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.
_MAC = 1, | ||
_OS_MODES_MAX = 2, | ||
}; | ||
static int os_mode = _MAC; |
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.
May want to use an unsigned 8 bit int, as it may save a bit of space. (also better to be specific)
static int os_mode = _MAC; | |
static uint8_t os_mode = _MAC; |
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.
Good idea; done.
Also fix unicode mode selection, oops.
#define NON_LANGUAGE_LAYERS ~(((1UL << _LAST_LANGUAGE_LAYER) - 1) - ((1UL << _FIRST_LANGUAGE_LAYER) - 1)) | ||
|
||
// Update the current layer state and return the layer we're in. | ||
int update_layer( |
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.
Probably worth converting these to uint8_t from int.
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.
Good call, done.
TODO: Extract a lot of this logic and make it more widely usable for polyglot keyboards!
Description
Adding a custom keymap. Testing out several ideas to generalize later!
Types of Changes
Issues Fixed or Closed by This PR
Checklist