Kaleidoscope
EEPROM-Keymap.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*-
2  * Kaleidoscope-EEPROM-Keymap -- EEPROM-based keymap support.
3  * Copyright (C) 2017 Gergely Nagy
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #pragma once
20 
21 #include <Kaleidoscope.h>
23 
24 namespace kaleidoscope {
26  public:
27  EEPROMKeymap(void);
28 
29  static void max_layers(uint8_t max);
30 
31  void begin(void) final;
32 
33  static uint16_t keymap_base(void);
34 
35  static Key getKey(uint8_t layer, byte row, byte col);
36  static Key getKeyOverride(uint8_t layer, byte row, byte col);
37 
38  static bool focusKeymap(const char *command);
39  static bool focusKeymapTransfer(const char *command);
40 
41  static void updateKey(uint16_t base_pos, Key key);
42 
43  private:
44  static uint16_t keymap_base_;
45  static uint8_t max_layers_;
46 
47  static Key parseKey(void);
48  static void printKey(Key key);
49 };
50 };
51 
void begin(void) final
Definition: EEPROM-Keymap.cpp:30
static uint16_t keymap_base(void)
Definition: EEPROM-Keymap.cpp:62
Definition: hid.cpp:4
static bool focusKeymapTransfer(const char *command)
Definition: EEPROM-Keymap.cpp:110
Definition: EEPROM-Keymap.h:25
static bool focusKeymap(const char *command)
Definition: EEPROM-Keymap.cpp:83
byte byte col
Definition: TapDance.cpp:229
Definition: key_defs.h:13
static Key getKeyOverride(uint8_t layer, byte row, byte col)
Definition: EEPROM-Keymap.cpp:53
EEPROMKeymap(void)
Definition: EEPROM-Keymap.cpp:27
static void updateKey(uint16_t base_pos, Key key)
Definition: EEPROM-Keymap.cpp:66
static void max_layers(uint8_t max)
Definition: EEPROM-Keymap.cpp:34
Definition: Kaleidoscope.h:40
byte row
Definition: TapDance.cpp:229
static Key getKey(uint8_t layer, byte row, byte col)
Definition: EEPROM-Keymap.cpp:39