Rename 'keyCache' to 'keymapCache', as it's a little bit more

descriptive
pull/175/head
Jesse Vincent 7 years ago
parent 6778581bcf
commit c8e846247c
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -17,8 +17,8 @@ Kaleidoscope_::setup(void) {
// TODO: figure out how to hint the compiler in a more reasonable way // TODO: figure out how to hint the compiler in a more reasonable way
handleKeyswitchEvent(Key_NoKey, 255, 255, 0); handleKeyswitchEvent(Key_NoKey, 255, 255, 0);
// Update the key cache, so we start with a non-empty state. // Update the keymap cache, so we start with a non-empty state.
Layer.updateKeyCache(); Layer.updateKeymapCache();
} }
void void

@ -45,7 +45,7 @@ static bool handleKeyswitchEventDefault(Key mappedKey, byte row, byte col, uint8
void handleKeyswitchEvent(Key mappedKey, byte row, byte col, uint8_t keyState) { void handleKeyswitchEvent(Key mappedKey, byte row, byte col, uint8_t keyState) {
if (keyToggledOn(keyState) || keyToggledOff(keyState)) if (keyToggledOn(keyState) || keyToggledOff(keyState))
Layer.updateKeyCache(row, col); Layer.updateKeymapCache(row, col);
/* If the key we are dealing with is masked, ignore it until it is released. /* If the key we are dealing with is masked, ignore it until it is released.
* When releasing it, clear the mask, so future key events can be handled * When releasing it, clear the mask, so future key events can be handled

@ -62,7 +62,7 @@ Layer_::getKeyFromPROGMEM(uint8_t layer, byte row, byte col) {
} }
void void
Layer_::updateKeyCache(byte row, byte col) { Layer_::updateKeymapCache(byte row, byte col) {
int8_t layer = highestLayer; int8_t layer = highestLayer;
if (row >= ROWS || col >= COLS) if (row >= ROWS || col >= COLS)
@ -81,10 +81,10 @@ Layer_::updateKeyCache(byte row, byte col) {
} }
void void
Layer_::updateKeyCache(void) { Layer_::updateKeymapCache(void) {
for (byte row = 0; row < ROWS; row++) { for (byte row = 0; row < ROWS; row++) {
for (byte col = 0; col < COLS; col++) { for (byte col = 0; col < COLS; col++) {
updateKeyCache(row, col); updateKeymapCache(row, col);
} }
} }
} }
@ -109,7 +109,7 @@ void Layer_::on(uint8_t layer) {
// Update the key cache, so that if anything depends on knowing the active // Update the key cache, so that if anything depends on knowing the active
// layout, the layout will be in sync. // layout, the layout will be in sync.
updateKeyCache(); updateKeymapCache();
} }
void Layer_::off(uint8_t layer) { void Layer_::off(uint8_t layer) {
@ -119,7 +119,7 @@ void Layer_::off(uint8_t layer) {
// Update the key cache, so that if anything depends on knowing the active // Update the key cache, so that if anything depends on knowing the active
// layout, the layout will be in sync. // layout, the layout will be in sync.
updateKeyCache(); updateKeymapCache();
} }
boolean Layer_::isOn(uint8_t layer) { boolean Layer_::isOn(uint8_t layer) {

@ -32,8 +32,8 @@ class Layer_ {
static Key getKeyFromPROGMEM(uint8_t layer, byte row, byte col); static Key getKeyFromPROGMEM(uint8_t layer, byte row, byte col);
static void updateKeyCache(byte row, byte col); static void updateKeymapCache(byte row, byte col);
static void updateKeyCache(void); static void updateKeymapCache(void);
private: private:
static uint8_t highestLayer; static uint8_t highestLayer;

Loading…
Cancel
Save