You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

actionmap.h 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. /*
  2. Copyright 2015 Jun Wako <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef ACTIONMAP_H
  15. #define ACTIONMAP_H
  16. #include "keyboard.h"
  17. #include "report.h"
  18. #include "keycode.h"
  19. #include "action_code.h"
  20. #include "action.h"
  21. /* Keymapping with 16bit action codes */
  22. extern const uint16_t actionmaps[][MATRIX_ROWS][MATRIX_COLS];
  23. /* Modified key */
  24. #define AC_c(kc) ACTION_MODS_KEY(MOD_LCTL, KC_##kc)
  25. #define AC_s(kc) ACTION_MODS_KEY(MOD_LSFT, KC_##kc)
  26. #define AC_a(kc) ACTION_MODS_KEY(MOD_LALT, KC_##kc)
  27. #define AC_g(kc) ACTION_MODS_KEY(MOD_LSFT, KC_##kc)
  28. /* Normal key */
  29. #define AC_NO ACTION_KEY(KC_NO)
  30. #define AC_TRANSPARENT ACTION_KEY(KC_TRANSPARENT)
  31. #define AC_ROLL_OVER ACTION_KEY(KC_ROLL_OVER)
  32. #define AC_POST_FAIL ACTION_KEY(KC_POST_FAIL)
  33. #define AC_UNDEFINED ACTION_KEY(KC_UNDEFINED)
  34. #define AC_A ACTION_KEY(KC_A)
  35. #define AC_B ACTION_KEY(KC_B)
  36. #define AC_C ACTION_KEY(KC_C)
  37. #define AC_D ACTION_KEY(KC_D)
  38. #define AC_E ACTION_KEY(KC_E)
  39. #define AC_F ACTION_KEY(KC_F)
  40. #define AC_G ACTION_KEY(KC_G)
  41. #define AC_H ACTION_KEY(KC_H)
  42. #define AC_I ACTION_KEY(KC_I)
  43. #define AC_J ACTION_KEY(KC_J)
  44. #define AC_K ACTION_KEY(KC_K)
  45. #define AC_L ACTION_KEY(KC_L)
  46. #define AC_M ACTION_KEY(KC_M)
  47. #define AC_N ACTION_KEY(KC_N)
  48. #define AC_O ACTION_KEY(KC_O)
  49. #define AC_P ACTION_KEY(KC_P)
  50. #define AC_Q ACTION_KEY(KC_Q)
  51. #define AC_R ACTION_KEY(KC_R)
  52. #define AC_S ACTION_KEY(KC_S)
  53. #define AC_T ACTION_KEY(KC_T)
  54. #define AC_U ACTION_KEY(KC_U)
  55. #define AC_V ACTION_KEY(KC_V)
  56. #define AC_W ACTION_KEY(KC_W)
  57. #define AC_X ACTION_KEY(KC_X)
  58. #define AC_Y ACTION_KEY(KC_Y)
  59. #define AC_Z ACTION_KEY(KC_Z)
  60. #define AC_1 ACTION_KEY(KC_1)
  61. #define AC_2 ACTION_KEY(KC_2)
  62. #define AC_3 ACTION_KEY(KC_3)
  63. #define AC_4 ACTION_KEY(KC_4)
  64. #define AC_5 ACTION_KEY(KC_5)
  65. #define AC_6 ACTION_KEY(KC_6)
  66. #define AC_7 ACTION_KEY(KC_7)
  67. #define AC_8 ACTION_KEY(KC_8)
  68. #define AC_9 ACTION_KEY(KC_9)
  69. #define AC_0 ACTION_KEY(KC_0)
  70. #define AC_ENTER ACTION_KEY(KC_ENTER)
  71. #define AC_ESCAPE ACTION_KEY(KC_ESCAPE)
  72. #define AC_BSPACE ACTION_KEY(KC_BSPACE)
  73. #define AC_TAB ACTION_KEY(KC_TAB)
  74. #define AC_SPACE ACTION_KEY(KC_SPACE)
  75. #define AC_MINUS ACTION_KEY(KC_MINUS)
  76. #define AC_EQUAL ACTION_KEY(KC_EQUAL)
  77. #define AC_LBRACKET ACTION_KEY(KC_LBRACKET)
  78. #define AC_RBRACKET ACTION_KEY(KC_RBRACKET)
  79. #define AC_BSLASH ACTION_KEY(KC_BSLASH)
  80. #define AC_NONUS_HASH ACTION_KEY(KC_NONUS_HASH)
  81. #define AC_SCOLON ACTION_KEY(KC_SCOLON)
  82. #define AC_QUOTE ACTION_KEY(KC_QUOTE)
  83. #define AC_GRAVE ACTION_KEY(KC_GRAVE)
  84. #define AC_COMMA ACTION_KEY(KC_COMMA)
  85. #define AC_DOT ACTION_KEY(KC_DOT)
  86. #define AC_SLASH ACTION_KEY(KC_SLASH)
  87. #define AC_CAPSLOCK ACTION_KEY(KC_CAPSLOCK)
  88. #define AC_F1 ACTION_KEY(KC_F1)
  89. #define AC_F2 ACTION_KEY(KC_F2)
  90. #define AC_F3 ACTION_KEY(KC_F3)
  91. #define AC_F4 ACTION_KEY(KC_F4)
  92. #define AC_F5 ACTION_KEY(KC_F5)
  93. #define AC_F6 ACTION_KEY(KC_F6)
  94. #define AC_F7 ACTION_KEY(KC_F7)
  95. #define AC_F8 ACTION_KEY(KC_F8)
  96. #define AC_F9 ACTION_KEY(KC_F9)
  97. #define AC_F10 ACTION_KEY(KC_F10)
  98. #define AC_F11 ACTION_KEY(KC_F11)
  99. #define AC_F12 ACTION_KEY(KC_F12)
  100. #define AC_PSCREEN ACTION_KEY(KC_PSCREEN)
  101. #define AC_SCROLLLOCK ACTION_KEY(KC_SCROLLLOCK)
  102. #define AC_PAUSE ACTION_KEY(KC_PAUSE)
  103. #define AC_INSERT ACTION_KEY(KC_INSERT)
  104. #define AC_HOME ACTION_KEY(KC_HOME)
  105. #define AC_PGUP ACTION_KEY(KC_PGUP)
  106. #define AC_DELETE ACTION_KEY(KC_DELETE)
  107. #define AC_END ACTION_KEY(KC_END)
  108. #define AC_PGDOWN ACTION_KEY(KC_PGDOWN)
  109. #define AC_RIGHT ACTION_KEY(KC_RIGHT)
  110. #define AC_LEFT ACTION_KEY(KC_LEFT)
  111. #define AC_DOWN ACTION_KEY(KC_DOWN)
  112. #define AC_UP ACTION_KEY(KC_UP)
  113. #define AC_NUMLOCK ACTION_KEY(KC_NUMLOCK)
  114. #define AC_KP_SLASH ACTION_KEY(KC_KP_SLASH)
  115. #define AC_KP_ASTERISK ACTION_KEY(KC_KP_ASTERISK)
  116. #define AC_KP_MINUS ACTION_KEY(KC_KP_MINUS)
  117. #define AC_KP_PLUS ACTION_KEY(KC_KP_PLUS)
  118. #define AC_KP_ENTER ACTION_KEY(KC_KP_ENTER)
  119. #define AC_KP_1 ACTION_KEY(KC_KP_1)
  120. #define AC_KP_2 ACTION_KEY(KC_KP_2)
  121. #define AC_KP_3 ACTION_KEY(KC_KP_3)
  122. #define AC_KP_4 ACTION_KEY(KC_KP_4)
  123. #define AC_KP_5 ACTION_KEY(KC_KP_5)
  124. #define AC_KP_6 ACTION_KEY(KC_KP_6)
  125. #define AC_KP_7 ACTION_KEY(KC_KP_7)
  126. #define AC_KP_8 ACTION_KEY(KC_KP_8)
  127. #define AC_KP_9 ACTION_KEY(KC_KP_9)
  128. #define AC_KP_0 ACTION_KEY(KC_KP_0)
  129. #define AC_KP_DOT ACTION_KEY(KC_KP_DOT)
  130. #define AC_NONUS_BSLASH ACTION_KEY(KC_NONUS_BSLASH)
  131. #define AC_APPLICATION ACTION_KEY(KC_APPLICATION)
  132. #define AC_POWER ACTION_KEY(KC_POWER)
  133. #define AC_KP_EQUAL ACTION_KEY(KC_KP_EQUAL)
  134. #define AC_F13 ACTION_KEY(KC_F13)
  135. #define AC_F14 ACTION_KEY(KC_F14)
  136. #define AC_F15 ACTION_KEY(KC_F15)
  137. #define AC_F16 ACTION_KEY(KC_F16)
  138. #define AC_F17 ACTION_KEY(KC_F17)
  139. #define AC_F18 ACTION_KEY(KC_F18)
  140. #define AC_F19 ACTION_KEY(KC_F19)
  141. #define AC_F20 ACTION_KEY(KC_F20)
  142. #define AC_F21 ACTION_KEY(KC_F21)
  143. #define AC_F22 ACTION_KEY(KC_F22)
  144. #define AC_F23 ACTION_KEY(KC_F23)
  145. #define AC_F24 ACTION_KEY(KC_F24)
  146. #define AC_EXECUTE ACTION_KEY(KC_EXECUTE)
  147. #define AC_HELP ACTION_KEY(KC_HELP)
  148. #define AC_MENU ACTION_KEY(KC_MENU)
  149. #define AC_SELECT ACTION_KEY(KC_SELECT)
  150. #define AC_STOP ACTION_KEY(KC_STOP)
  151. #define AC_AGAIN ACTION_KEY(KC_AGAIN)
  152. #define AC_UNDO ACTION_KEY(KC_UNDO)
  153. #define AC_CUT ACTION_KEY(KC_CUT)
  154. #define AC_COPY ACTION_KEY(KC_COPY)
  155. #define AC_PASTE ACTION_KEY(KC_PASTE)
  156. #define AC_FIND ACTION_KEY(KC_FIND)
  157. #define AC__MUTE ACTION_KEY(KC__MUTE)
  158. #define AC__VOLUP ACTION_KEY(KC__VOLUP)
  159. #define AC__VOLDOWN ACTION_KEY(KC__VOLDOWN)
  160. #define AC_LOCKING_CAPS ACTION_KEY(KC_LOCKING_CAPS)
  161. #define AC_LOCKING_NUM ACTION_KEY(KC_LOCKING_NUM)
  162. #define AC_LOCKING_SCROLL ACTION_KEY(KC_LOCKING_SCROLL)
  163. #define AC_KP_COMMA ACTION_KEY(KC_KP_COMMA)
  164. #define AC_KP_EQUAL_AS400 ACTION_KEY(KC_KP_EQUAL_AS400)
  165. #define AC_INT1 ACTION_KEY(KC_INT1)
  166. #define AC_INT2 ACTION_KEY(KC_INT2)
  167. #define AC_INT3 ACTION_KEY(KC_INT3)
  168. #define AC_INT4 ACTION_KEY(KC_INT4)
  169. #define AC_INT5 ACTION_KEY(KC_INT5)
  170. #define AC_INT6 ACTION_KEY(KC_INT6)
  171. #define AC_INT7 ACTION_KEY(KC_INT7)
  172. #define AC_INT8 ACTION_KEY(KC_INT8)
  173. #define AC_INT9 ACTION_KEY(KC_INT9)
  174. #define AC_LANG1 ACTION_KEY(KC_LANG1)
  175. #define AC_LANG2 ACTION_KEY(KC_LANG2)
  176. #define AC_LANG3 ACTION_KEY(KC_LANG3)
  177. #define AC_LANG4 ACTION_KEY(KC_LANG4)
  178. #define AC_LANG5 ACTION_KEY(KC_LANG5)
  179. #define AC_LANG6 ACTION_KEY(KC_LANG6)
  180. #define AC_LANG7 ACTION_KEY(KC_LANG7)
  181. #define AC_LANG8 ACTION_KEY(KC_LANG8)
  182. #define AC_LANG9 ACTION_KEY(KC_LANG9)
  183. #define AC_ALT_ERASE ACTION_KEY(KC_ALT_ERASE)
  184. #define AC_SYSREQ ACTION_KEY(KC_SYSREQ)
  185. #define AC_CANCEL ACTION_KEY(KC_CANCEL)
  186. #define AC_CLEAR ACTION_KEY(KC_CLEAR)
  187. #define AC_PRIOR ACTION_KEY(KC_PRIOR)
  188. #define AC_RETURN ACTION_KEY(KC_RETURN)
  189. #define AC_SEPARATOR ACTION_KEY(KC_SEPARATOR)
  190. #define AC_OUT ACTION_KEY(KC_OUT)
  191. #define AC_OPER ACTION_KEY(KC_OPER)
  192. #define AC_CLEAR_AGAIN ACTION_KEY(KC_CLEAR_AGAIN)
  193. #define AC_CRSEL ACTION_KEY(KC_CRSEL)
  194. #define AC_EXSEL ACTION_KEY(KC_EXSEL)
  195. #define AC_KP_00 ACTION_KEY(KC_KP_00)
  196. #define AC_KP_000 ACTION_KEY(KC_KP_000)
  197. #define AC_THOUSANDS_SEPARATOR ACTION_KEY(KC_THOUSANDS_SEPARATOR)
  198. #define AC_DECIMAL_SEPARATOR ACTION_KEY(KC_DECIMAL_SEPARATOR)
  199. #define AC_CURRENCY_UNIT ACTION_KEY(KC_CURRENCY_UNIT)
  200. #define AC_CURRENCY_SUB_UNIT ACTION_KEY(KC_CURRENCY_SUB_UNIT)
  201. #define AC_KP_LPAREN ACTION_KEY(KC_KP_LPAREN)
  202. #define AC_KP_RPAREN ACTION_KEY(KC_KP_RPAREN)
  203. #define AC_KP_LCBRACKET ACTION_KEY(KC_KP_LCBRACKET)
  204. #define AC_KP_RCBRACKET ACTION_KEY(KC_KP_RCBRACKET)
  205. #define AC_KP_TAB ACTION_KEY(KC_KP_TAB)
  206. #define AC_KP_BSPACE ACTION_KEY(KC_KP_BSPACE)
  207. #define AC_KP_A ACTION_KEY(KC_KP_A)
  208. #define AC_KP_B ACTION_KEY(KC_KP_B)
  209. #define AC_KP_C ACTION_KEY(KC_KP_C)
  210. #define AC_KP_D ACTION_KEY(KC_KP_D)
  211. #define AC_KP_E ACTION_KEY(KC_KP_E)
  212. #define AC_KP_F ACTION_KEY(KC_KP_F)
  213. #define AC_KP_XOR ACTION_KEY(KC_KP_XOR)
  214. #define AC_KP_HAT ACTION_KEY(KC_KP_HAT)
  215. #define AC_KP_PERC ACTION_KEY(KC_KP_PERC)
  216. #define AC_KP_LT ACTION_KEY(KC_KP_LT)
  217. #define AC_KP_GT ACTION_KEY(KC_KP_GT)
  218. #define AC_KP_AND ACTION_KEY(KC_KP_AND)
  219. #define AC_KP_LAZYAND ACTION_KEY(KC_KP_LAZYAND)
  220. #define AC_KP_OR ACTION_KEY(KC_KP_OR)
  221. #define AC_KP_LAZYOR ACTION_KEY(KC_KP_LAZYOR)
  222. #define AC_KP_COLON ACTION_KEY(KC_KP_COLON)
  223. #define AC_KP_HASH ACTION_KEY(KC_KP_HASH)
  224. #define AC_KP_SPACE ACTION_KEY(KC_KP_SPACE)
  225. #define AC_KP_ATMARK ACTION_KEY(KC_KP_ATMARK)
  226. #define AC_KP_EXCLAMATION ACTION_KEY(KC_KP_EXCLAMATION)
  227. #define AC_KP_MEM_STORE ACTION_KEY(KC_KP_MEM_STORE)
  228. #define AC_KP_MEM_RECALL ACTION_KEY(KC_KP_MEM_RECALL)
  229. #define AC_KP_MEM_CLEAR ACTION_KEY(KC_KP_MEM_CLEAR)
  230. #define AC_KP_MEM_ADD ACTION_KEY(KC_KP_MEM_ADD)
  231. #define AC_KP_MEM_SUB ACTION_KEY(KC_KP_MEM_SUB)
  232. #define AC_KP_MEM_MUL ACTION_KEY(KC_KP_MEM_MUL)
  233. #define AC_KP_MEM_DIV ACTION_KEY(KC_KP_MEM_DIV)
  234. #define AC_KP_PLUS_MINUS ACTION_KEY(KC_KP_PLUS_MINUS)
  235. #define AC_KP_CLEAR ACTION_KEY(KC_KP_CLEAR)
  236. #define AC_KP_CLEAR_ENTRY ACTION_KEY(KC_KP_CLEAR_ENTRY)
  237. #define AC_KP_BINARY ACTION_KEY(KC_KP_BINARY)
  238. #define AC_KP_OCTAL ACTION_KEY(KC_KP_OCTAL)
  239. #define AC_KP_DECIMAL ACTION_KEY(KC_KP_DECIMAL)
  240. #define AC_KP_HEXADECIMAL ACTION_KEY(KC_KP_HEXADECIMAL)
  241. /* Modifiers */
  242. #define AC_LCTRL ACTION_KEY(KC_LCTRL)
  243. #define AC_LSHIFT ACTION_KEY(KC_LSHIFT)
  244. #define AC_LALT ACTION_KEY(KC_LALT)
  245. #define AC_LGUI ACTION_KEY(KC_LGUI)
  246. #define AC_RCTRL ACTION_KEY(KC_RCTRL)
  247. #define AC_RSHIFT ACTION_KEY(KC_RSHIFT)
  248. #define AC_RALT ACTION_KEY(KC_RALT)
  249. #define AC_RGUI ACTION_KEY(KC_RGUI)
  250. /*
  251. * TMK extensions
  252. */
  253. /* Sytem Control */
  254. #define AC_SYSTEM_POWER ACTION_USAGE_SYSTEM(SYSTEM_POWER_DOWN)
  255. #define AC_SYSTEM_SLEEP ACTION_USAGE_SYSTEM(SYSTEM_SLEEP)
  256. #define AC_SYSTEM_WAKE ACTION_USAGE_SYSTEM(SYSTEM_WAKE_UP)
  257. /* Consumer Page */
  258. #define AC_AUDIO_MUTE ACTION_USAGE_CONSUMER(AUDIO_MUTE)
  259. #define AC_AUDIO_VOL_UP ACTION_USAGE_CONSUMER(AUDIO_VOL_UP)
  260. #define AC_AUDIO_VOL_DOWN ACTION_USAGE_CONSUMER(AUDIO_VOL_DOWN)
  261. #define AC_MEDIA_NEXT_TRACK ACTION_USAGE_CONSUMER(TRANSPORT_NEXT_TRACK)
  262. #define AC_MEDIA_PREV_TRACK ACTION_USAGE_CONSUMER(TRANSPORT_PREV_TRACK)
  263. #define AC_MEDIA_FAST_FORWARD ACTION_USAGE_CONSUMER(TRANSPORT_FAST_FORWARD)
  264. #define AC_MEDIA_REWIND ACTION_USAGE_CONSUMER(TRANSPORT_REWIND)
  265. #define AC_MEDIA_STOP ACTION_USAGE_CONSUMER(TRANSPORT_STOP)
  266. #define AC_MEDIA_PLAY_PAUSE ACTION_USAGE_CONSUMER(TRANSPORT_PLAY_PAUSE)
  267. #define AC_MEDIA_EJECT ACTION_USAGE_CONSUMER(TRANSPORT_STOP_EJECT)
  268. #define AC_MEDIA_SELECT ACTION_USAGE_CONSUMER(APPLAUNCH_CC_CONFIG)
  269. #define AC_MAIL ACTION_USAGE_CONSUMER(APPLAUNCH_EMAIL)
  270. #define AC_CALCULATOR ACTION_USAGE_CONSUMER(APPLAUNCH_CALCULATOR)
  271. #define AC_MY_COMPUTER ACTION_USAGE_CONSUMER(APPLAUNCH_LOCAL_BROWSER)
  272. #define AC_WWW_SEARCH ACTION_USAGE_CONSUMER(APPCONTROL_SEARCH)
  273. #define AC_WWW_HOME ACTION_USAGE_CONSUMER(APPCONTROL_HOME)
  274. #define AC_WWW_BACK ACTION_USAGE_CONSUMER(APPCONTROL_BACK)
  275. #define AC_WWW_FORWARD ACTION_USAGE_CONSUMER(APPCONTROL_FORWARD)
  276. #define AC_WWW_STOP ACTION_USAGE_CONSUMER(APPCONTROL_STOP)
  277. #define AC_WWW_REFRESH ACTION_USAGE_CONSUMER(APPCONTROL_REFRESH)
  278. #define AC_WWW_FAVORITES ACTION_USAGE_CONSUMER(APPCONTROL_BOOKMARKS)
  279. /* Jump to bootloader */
  280. #define AC_BOOTLOADER ACTION_KEY(KC_BOOTLOADER)
  281. /* Fn key */
  282. /*
  283. #define AC_FN0 ACTION_KEY(KC_FN0)
  284. #define AC_FN1 ACTION_KEY(KC_FN1)
  285. #define AC_FN2 ACTION_KEY(KC_FN2)
  286. #define AC_FN3 ACTION_KEY(KC_FN3)
  287. #define AC_FN4 ACTION_KEY(KC_FN4)
  288. #define AC_FN5 ACTION_KEY(KC_FN5)
  289. #define AC_FN6 ACTION_KEY(KC_FN6)
  290. #define AC_FN7 ACTION_KEY(KC_FN7)
  291. #define AC_FN8 ACTION_KEY(KC_FN8)
  292. #define AC_FN9 ACTION_KEY(KC_FN9)
  293. #define AC_FN10 ACTION_KEY(KC_FN10)
  294. #define AC_FN11 ACTION_KEY(KC_FN11)
  295. #define AC_FN12 ACTION_KEY(KC_FN12)
  296. #define AC_FN13 ACTION_KEY(KC_FN13)
  297. #define AC_FN14 ACTION_KEY(KC_FN14)
  298. #define AC_FN15 ACTION_KEY(KC_FN15)
  299. #define AC_FN16 ACTION_KEY(KC_FN16)
  300. #define AC_FN17 ACTION_KEY(KC_FN17)
  301. #define AC_FN18 ACTION_KEY(KC_FN18)
  302. #define AC_FN19 ACTION_KEY(KC_FN19)
  303. #define AC_FN20 ACTION_KEY(KC_FN20)
  304. #define AC_FN21 ACTION_KEY(KC_FN21)
  305. #define AC_FN22 ACTION_KEY(KC_FN22)
  306. #define AC_FN23 ACTION_KEY(KC_FN23)
  307. #define AC_FN24 ACTION_KEY(KC_FN24)
  308. #define AC_FN25 ACTION_KEY(KC_FN25)
  309. #define AC_FN26 ACTION_KEY(KC_FN26)
  310. #define AC_FN27 ACTION_KEY(KC_FN27)
  311. #define AC_FN28 ACTION_KEY(KC_FN28)
  312. #define AC_FN29 ACTION_KEY(KC_FN29)
  313. #define AC_FN30 ACTION_KEY(KC_FN30)
  314. #define AC_FN31 ACTION_KEY(KC_FN31)
  315. */
  316. /* Mousekey */
  317. #define AC_MS_UP ACTION_MOUSEKEY(KC_MS_UP)
  318. #define AC_MS_DOWN ACTION_MOUSEKEY(KC_MS_DOWN)
  319. #define AC_MS_LEFT ACTION_MOUSEKEY(KC_MS_LEFT)
  320. #define AC_MS_RIGHT ACTION_MOUSEKEY(KC_MS_RIGHT)
  321. #define AC_MS_BTN1 ACTION_MOUSEKEY(KC_MS_BTN1)
  322. #define AC_MS_BTN2 ACTION_MOUSEKEY(KC_MS_BTN2)
  323. #define AC_MS_BTN3 ACTION_MOUSEKEY(KC_MS_BTN3)
  324. #define AC_MS_BTN4 ACTION_MOUSEKEY(KC_MS_BTN4)
  325. #define AC_MS_BTN5 ACTION_MOUSEKEY(KC_MS_BTN5)
  326. #define AC_MS_WH_UP ACTION_MOUSEKEY(KC_MS_WH_UP)
  327. #define AC_MS_WH_DOWN ACTION_MOUSEKEY(KC_MS_WH_DOWN)
  328. #define AC_MS_WH_LEFT ACTION_MOUSEKEY(KC_MS_WH_LEFT)
  329. #define AC_MS_WH_RIGHT ACTION_MOUSEKEY(KC_MS_WH_RIGHT)
  330. #define AC_MS_ACCEL0 ACTION_MOUSEKEY(KC_MS_ACCEL0)
  331. #define AC_MS_ACCEL1 ACTION_MOUSEKEY(KC_MS_ACCEL1)
  332. #define AC_MS_ACCEL2 ACTION_MOUSEKEY(KC_MS_ACCEL2)
  333. /*
  334. * Short names
  335. */
  336. #define AC_LCTL ACTION_KEY(KC_LCTRL)
  337. #define AC_RCTL ACTION_KEY(KC_RCTRL)
  338. #define AC_LSFT ACTION_KEY(KC_LSHIFT)
  339. #define AC_RSFT ACTION_KEY(KC_RSHIFT)
  340. #define AC_ESC ACTION_KEY(KC_ESCAPE)
  341. #define AC_BSPC ACTION_KEY(KC_BSPACE)
  342. #define AC_ENT ACTION_KEY(KC_ENTER)
  343. #define AC_DEL ACTION_KEY(KC_DELETE)
  344. #define AC_INS ACTION_KEY(KC_INSERT)
  345. #define AC_CAPS ACTION_KEY(KC_CAPSLOCK)
  346. #define AC_CLCK ACTION_KEY(KC_CAPSLOCK)
  347. #define AC_RGHT ACTION_KEY(KC_RIGHT)
  348. #define AC_PGDN ACTION_KEY(KC_PGDOWN)
  349. #define AC_PSCR ACTION_KEY(KC_PSCREEN)
  350. #define AC_SLCK ACTION_KEY(KC_SCROLLLOCK)
  351. #define AC_PAUS ACTION_KEY(KC_PAUSE)
  352. #define AC_BRK ACTION_KEY(KC_PAUSE)
  353. #define AC_NLCK ACTION_KEY(KC_NUMLOCK)
  354. #define AC_SPC ACTION_KEY(KC_SPACE)
  355. #define AC_MINS ACTION_KEY(KC_MINUS)
  356. #define AC_EQL ACTION_KEY(KC_EQUAL)
  357. #define AC_GRV ACTION_KEY(KC_GRAVE)
  358. #define AC_RBRC ACTION_KEY(KC_RBRACKET)
  359. #define AC_LBRC ACTION_KEY(KC_LBRACKET)
  360. #define AC_COMM ACTION_KEY(KC_COMMA)
  361. #define AC_BSLS ACTION_KEY(KC_BSLASH)
  362. #define AC_SLSH ACTION_KEY(KC_SLASH)
  363. #define AC_SCLN ACTION_KEY(KC_SCOLON)
  364. #define AC_QUOT ACTION_KEY(KC_QUOTE)
  365. #define AC_APP ACTION_KEY(KC_APPLICATION)
  366. #define AC_NUHS ACTION_KEY(KC_NONUS_HASH)
  367. #define AC_NUBS ACTION_KEY(KC_NONUS_BSLASH)
  368. #define AC_LCAP ACTION_KEY(KC_LOCKING_CAPS)
  369. #define AC_LNUM ACTION_KEY(KC_LOCKING_NUM)
  370. #define AC_LSCR ACTION_KEY(KC_LOCKING_SCROLL)
  371. #define AC_ERAS ACTION_KEY(KC_ALT_ERASE,)
  372. #define AC_CLR ACTION_KEY(KC_CLEAR)
  373. /* Japanese specific */
  374. #define AC_ZKHK ACTION_KEY(KC_GRAVE)
  375. #define AC_RO ACTION_KEY(KC_INT1)
  376. #define AC_KANA ACTION_KEY(KC_INT2)
  377. #define AC_JYEN ACTION_KEY(KC_INT3)
  378. #define AC_HENK ACTION_KEY(KC_INT4)
  379. #define AC_MHEN ACTION_KEY(KC_INT5)
  380. /* Keypad */
  381. #define AC_P1 ACTION_KEY(KC_KP_1)
  382. #define AC_P2 ACTION_KEY(KC_KP_2)
  383. #define AC_P3 ACTION_KEY(KC_KP_3)
  384. #define AC_P4 ACTION_KEY(KC_KP_4)
  385. #define AC_P5 ACTION_KEY(KC_KP_5)
  386. #define AC_P6 ACTION_KEY(KC_KP_6)
  387. #define AC_P7 ACTION_KEY(KC_KP_7)
  388. #define AC_P8 ACTION_KEY(KC_KP_8)
  389. #define AC_P9 ACTION_KEY(KC_KP_9)
  390. #define AC_P0 ACTION_KEY(KC_KP_0)
  391. #define AC_PDOT ACTION_KEY(KC_KP_DOT)
  392. #define AC_PCMM ACTION_KEY(KC_KP_COMMA)
  393. #define AC_PSLS ACTION_KEY(KC_KP_SLASH)
  394. #define AC_PAST ACTION_KEY(KC_KP_ASTERISK)
  395. #define AC_PMNS ACTION_KEY(KC_KP_MINUS)
  396. #define AC_PPLS ACTION_KEY(KC_KP_PLUS)
  397. #define AC_PEQL ACTION_KEY(KC_KP_EQUAL)
  398. #define AC_PENT ACTION_KEY(KC_KP_ENTER)
  399. /* Mousekey */
  400. #define AC_MS_U ACTION_MOUSEKEY(KC_MS_UP)
  401. #define AC_MS_D ACTION_MOUSEKEY(KC_MS_DOWN)
  402. #define AC_MS_L ACTION_MOUSEKEY(KC_MS_LEFT)
  403. #define AC_MS_R ACTION_MOUSEKEY(KC_MS_RIGHT)
  404. #define AC_BTN1 ACTION_MOUSEKEY(KC_MS_BTN1)
  405. #define AC_BTN2 ACTION_MOUSEKEY(KC_MS_BTN2)
  406. #define AC_BTN3 ACTION_MOUSEKEY(KC_MS_BTN3)
  407. #define AC_BTN4 ACTION_MOUSEKEY(KC_MS_BTN4)
  408. #define AC_BTN5 ACTION_MOUSEKEY(KC_MS_BTN5)
  409. #define AC_WH_U ACTION_MOUSEKEY(KC_MS_WH_UP)
  410. #define AC_WH_D ACTION_MOUSEKEY(KC_MS_WH_DOWN)
  411. #define AC_WH_L ACTION_MOUSEKEY(KC_MS_WH_LEFT)
  412. #define AC_WH_R ACTION_MOUSEKEY(KC_MS_WH_RIGHT)
  413. #define AC_ACL0 ACTION_MOUSEKEY(KC_MS_ACCEL0)
  414. #define AC_ACL1 ACTION_MOUSEKEY(KC_MS_ACCEL1)
  415. #define AC_ACL2 ACTION_MOUSEKEY(KC_MS_ACCEL2)
  416. /* Sytem Control */
  417. #define AC_PWR ACTION_USAGE_SYSTEM(SYSTEM_POWER_DOWN)
  418. #define AC_SLEP ACTION_USAGE_SYSTEM(SYSTEM_SLEEP)
  419. #define AC_WAKE ACTION_USAGE_SYSTEM(SYSTEM_WAKE_UP)
  420. /* Consumer Page */
  421. #define AC_MUTE ACTION_USAGE_CONSUMER(AUDIO_MUTE)
  422. #define AC_VOLU ACTION_USAGE_CONSUMER(AUDIO_VOL_UP)
  423. #define AC_VOLD ACTION_USAGE_CONSUMER(AUDIO_VOL_DOWN)
  424. #define AC_MNXT ACTION_USAGE_CONSUMER(TRANSPORT_NEXT_TRACK)
  425. #define AC_MPRV ACTION_USAGE_CONSUMER(TRANSPORT_PREV_TRACK)
  426. #define AC_MFFD ACTION_USAGE_CONSUMER(TRANSPORT_FAST_FORWARD)
  427. #define AC_MRWD ACTION_USAGE_CONSUMER(TRANSPORT_REWIND)
  428. #define AC_MSTP ACTION_USAGE_CONSUMER(TRANSPORT_STOP)
  429. #define AC_MPLY ACTION_USAGE_CONSUMER(TRANSPORT_PLAY_PAUSE)
  430. #define AC_EJCT ACTION_USAGE_CONSUMER(TRANSPORT_STOP_EJECT)
  431. #define AC_MSEL ACTION_USAGE_CONSUMER(APPLAUNCH_CC_CONFIG)
  432. #define AC_MAIL ACTION_USAGE_CONSUMER(APPLAUNCH_EMAIL)
  433. #define AC_CALC ACTION_USAGE_CONSUMER(APPLAUNCH_CALCULATOR)
  434. #define AC_MYCM ACTION_USAGE_CONSUMER(APPLAUNCH_LOCAL_BROWSER)
  435. #define AC_WSCH ACTION_USAGE_CONSUMER(APPCONTROL_SEARCH)
  436. #define AC_WHOM ACTION_USAGE_CONSUMER(APPCONTROL_HOME)
  437. #define AC_WBAK ACTION_USAGE_CONSUMER(APPCONTROL_BACK)
  438. #define AC_WFWD ACTION_USAGE_CONSUMER(APPCONTROL_FORWARD)
  439. #define AC_WSTP ACTION_USAGE_CONSUMER(APPCONTROL_STOP)
  440. #define AC_WREF ACTION_USAGE_CONSUMER(APPCONTROL_REFRESH)
  441. #define AC_WFAV ACTION_USAGE_CONSUMER(APPCONTROL_BOOKMARKS)
  442. /* Jump to bootloader */
  443. #define AC_BTLD ACTION_KEY(KC_BOOTLOADER)
  444. /* Transparent */
  445. #define AC_TRNS ACTION_KEY(KC_TRANSPARENT)
  446. #endif