Guest User

Untitled

a guest
May 7th, 2016
1,044
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. /*
  2. Copyright 2012,2013 Jun Wako <[email protected]>
  3.  
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License, or
  7. (at your option) any later version.
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17.  
  18. #include "keymap_common.h"
  19.  
  20. const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  21. /* 0: qwerty */
  22. KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, \
  23. GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC,HOME,PGUP,\
  24. TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS,END, PGDN,\
  25. CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, INS, \
  26. LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,DEL, UP, \
  27. LCTL, LGUI,LALT, SPC, RALT,RGUI,APP, RCTL,LEFT,DOWN,RGHT),
  28. };
  29. const uint16_t PROGMEM fn_actions[] = {};
  30.  
  31. uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
  32. {
  33. return keymaps[(layer)][(key.row)][(key.col)];
  34. }
  35.  
  36. /* translates Fn keycode to action */
  37. action_t keymap_fn_to_action(uint8_t keycode)
  38. {
  39. return (action_t){ .code = fn_actions[FN_INDEX(keycode)] };
  40. }
Advertisement
Add Comment
Please, Sign In to add comment