From 6b201ac997c02112f00a9fe7b21908113ff5f295 Mon Sep 17 00:00:00 2001 From: Dave Date: Sun, 29 Dec 2019 09:24:11 -0600 Subject: [PATCH] Add missing asdf_keymaps.h file --- firmware/asdf/src/asdf_keymaps.h | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 firmware/asdf/src/asdf_keymaps.h diff --git a/firmware/asdf/src/asdf_keymaps.h b/firmware/asdf/src/asdf_keymaps.h new file mode 100644 index 0000000..c612633 --- /dev/null +++ b/firmware/asdf/src/asdf_keymaps.h @@ -0,0 +1,49 @@ +// -*- mode: C; tab-width: 4 ; indent-tabs-mode: nil -*- +// +// Unfified Keyboard Project +// ASDF keyboard firmware +// +// asdf_keymaps.h +// +// Copyright 2019 David Fenyes +// +// 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 3 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 . + +// While there is nothing preventing a standard keyboard from having both a +// "Shift Lock" key and a "Caps Lock" key, usually only one will be present. For +// testing, both must be present to test their functionality. + +#if !defined(ASDF_KEYMAPS_H) +#define ASDF_KEYMAPS_H + +// PROCEDURE: asdf_keymaps_init +// INPUTS: none +// OUTPUTS: none +// DESCRIPTION: Assigns the keymaps to the indices specified by the modifier +// index, to avoid hard-coding constant index values. +void asdf_keymaps_init(void); + +// PROCEDURE: asdf_keymaps_get_code +// INPUTS: row, col: row and column of key that has been pressed +// modifiers_index: index into the keymap array, based on modifier state +// OUTPUTS: returns a key code. +// DESCRIPTION: Given a key row and column, and an index based on modifier +// state, return the appropriate keycode. +asdf_keycode_t asdf_keymaps_get_code(uint8_t row, uint8_t col, uint8_t modifier_index); + + +#endif /* !defined (ASDF_KEYMAPS_H) */ + +//-------|---------|---------+---------+---------+---------+---------+---------+ +// Above line is 80 columns, and should display completely in the editor.