From a5ecf146085716f3a79424c2f4b3b3039ff36b3e Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 16 Jul 2019 16:15:07 +1000 Subject: Sendstring LUT improvements (#5727) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Align sendstring LUTs to 9 characters wide * Replace 0 with XXXXXXX * Use decimal 128 for LUT size * Align heading comments * Add ASCII table comments * Add missing AltGr LUTs and adjust keycode LUTs accordingly * Use pragma once * Correct a couple more keycodes * Capitalise "BÉPO" * Also clean up the default tables * Tidy up Belgian and Norman LUTs --- quantum/keymap_extras/sendstring_uk.h | 61 ++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 23 deletions(-) (limited to 'quantum/keymap_extras/sendstring_uk.h') diff --git a/quantum/keymap_extras/sendstring_uk.h b/quantum/keymap_extras/sendstring_uk.h index 2824e5d444..a01c9bc439 100644 --- a/quantum/keymap_extras/sendstring_uk.h +++ b/quantum/keymap_extras/sendstring_uk.h @@ -14,12 +14,13 @@ * along with this program. If not, see . */ -/* SEND_STRING() LUTs for UK layouts */ +// Sendstring lookup tables for UK layouts -#ifndef SENDSTRING_UK -#define SENDSTRING_UK +#pragma once -const bool ascii_to_shift_lut[0x80] PROGMEM = { +#include "keymap_uk.h" + +const bool ascii_to_shift_lut[128] PROGMEM = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -39,24 +40,38 @@ const bool ascii_to_shift_lut[0x80] PROGMEM = { 0, 0, 0, 1, 1, 1, 1, 0 }; -const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { - 0, 0, 0, 0, 0, 0, 0, 0, - KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, KC_ESC, 0, 0, 0, 0, +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_SPC, KC_1, KC_2, KC_NUHS, KC_4, KC_5, KC_7, KC_QUOT, - KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, - KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, - KC_QUOT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, - KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, - KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, - KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, - KC_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, - KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, - KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, - KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL + // ! " # $ % & ' + UK_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, + // ( ) * + , - . / + UK_9, UK_0, UK_8, UK_EQL, UK_COMM, UK_MINS, UK_DOT, UK_SLSH, + // 0 1 2 3 4 5 6 7 + UK_0, UK_1, UK_2, UK_3, UK_4, UK_5, UK_6, UK_7, + // 8 9 : ; < = > ? + UK_8, UK_9, UK_SCLN, UK_SCLN, UK_COMM, UK_EQL, UK_DOT, UK_SLSH, + // @ A B C D E F G + UK_QUOT, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, + // H I J K L M N O + UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, + // P Q R S T U V W + UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, + // X Y Z [ \ ] ^ _ + UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_6, UK_MINS, + // ` a b c d e f g + UK_GRV, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, + // h i j k l m n o + UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, + // p q r s t u v w + UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, + // x y z { | } ~ DEL + UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_HASH, KC_DEL }; - -#endif -- cgit v1.2.3 From b624f32f944acdc59dcb130674c09090c5c404cb Mon Sep 17 00:00:00 2001 From: skullY Date: Fri, 30 Aug 2019 11:19:03 -0700 Subject: clang-format changes --- quantum/keymap_extras/sendstring_uk.h | 49 ++++++++++++----------------------- 1 file changed, 16 insertions(+), 33 deletions(-) (limited to 'quantum/keymap_extras/sendstring_uk.h') diff --git a/quantum/keymap_extras/sendstring_uk.h b/quantum/keymap_extras/sendstring_uk.h index a01c9bc439..e5bbe25644 100644 --- a/quantum/keymap_extras/sendstring_uk.h +++ b/quantum/keymap_extras/sendstring_uk.h @@ -20,58 +20,41 @@ #include "keymap_uk.h" -const bool ascii_to_shift_lut[128] PROGMEM = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, +const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 0, 1, 1, 1, 0, - 1, 1, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 1, 1, 1, 0 -}; + 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - UK_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, + UK_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, // ( ) * + , - . / - UK_9, UK_0, UK_8, UK_EQL, UK_COMM, UK_MINS, UK_DOT, UK_SLSH, + UK_9, UK_0, UK_8, UK_EQL, UK_COMM, UK_MINS, UK_DOT, UK_SLSH, // 0 1 2 3 4 5 6 7 - UK_0, UK_1, UK_2, UK_3, UK_4, UK_5, UK_6, UK_7, + UK_0, UK_1, UK_2, UK_3, UK_4, UK_5, UK_6, UK_7, // 8 9 : ; < = > ? - UK_8, UK_9, UK_SCLN, UK_SCLN, UK_COMM, UK_EQL, UK_DOT, UK_SLSH, + UK_8, UK_9, UK_SCLN, UK_SCLN, UK_COMM, UK_EQL, UK_DOT, UK_SLSH, // @ A B C D E F G - UK_QUOT, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, + UK_QUOT, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, // H I J K L M N O - UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, + UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, // P Q R S T U V W - UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, + UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, // X Y Z [ \ ] ^ _ - UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_6, UK_MINS, + UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_6, UK_MINS, // ` a b c d e f g - UK_GRV, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, + UK_GRV, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, // h i j k l m n o - UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, + UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, // p q r s t u v w - UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, + UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, // x y z { | } ~ DEL - UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_HASH, KC_DEL -}; + UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_HASH, KC_DEL}; -- cgit v1.2.3 From 8ab7f1f39e715c824cc0e1391aa9a469b2a18438 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 29 Oct 2019 09:54:05 +1100 Subject: Fix formatting for sendstring LUTs (#7176) --- quantum/keymap_extras/sendstring_uk.h | 51 ++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) (limited to 'quantum/keymap_extras/sendstring_uk.h') diff --git a/quantum/keymap_extras/sendstring_uk.h b/quantum/keymap_extras/sendstring_uk.h index e5bbe25644..982456e40a 100644 --- a/quantum/keymap_extras/sendstring_uk.h +++ b/quantum/keymap_extras/sendstring_uk.h @@ -20,41 +20,60 @@ #include "keymap_uk.h" -const bool ascii_to_shift_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// clang-format off - 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}; +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 1, 0, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI - KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // DLE DC1 DC2 DC3 DC4 NAK SYN ETB XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // CAN EM SUB ESC FS GS RS US - XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - UK_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, + UK_SPC, UK_1, UK_2, UK_HASH, UK_4, UK_5, UK_7, UK_QUOT, // ( ) * + , - . / - UK_9, UK_0, UK_8, UK_EQL, UK_COMM, UK_MINS, UK_DOT, UK_SLSH, + UK_9, UK_0, UK_8, UK_EQL, UK_COMM, UK_MINS, UK_DOT, UK_SLSH, // 0 1 2 3 4 5 6 7 - UK_0, UK_1, UK_2, UK_3, UK_4, UK_5, UK_6, UK_7, + UK_0, UK_1, UK_2, UK_3, UK_4, UK_5, UK_6, UK_7, // 8 9 : ; < = > ? - UK_8, UK_9, UK_SCLN, UK_SCLN, UK_COMM, UK_EQL, UK_DOT, UK_SLSH, + UK_8, UK_9, UK_SCLN, UK_SCLN, UK_COMM, UK_EQL, UK_DOT, UK_SLSH, // @ A B C D E F G - UK_QUOT, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, + UK_QUOT, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, // H I J K L M N O - UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, + UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, // P Q R S T U V W - UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, + UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, // X Y Z [ \ ] ^ _ - UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_6, UK_MINS, + UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_6, UK_MINS, // ` a b c d e f g - UK_GRV, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, + UK_GRV, UK_A, UK_B, UK_C, UK_D, UK_E, UK_F, UK_G, // h i j k l m n o - UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, + UK_H, UK_I, UK_J, UK_K, UK_L, UK_M, UK_N, UK_O, // p q r s t u v w - UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, + UK_P, UK_Q, UK_R, UK_S, UK_T, UK_U, UK_V, UK_W, // x y z { | } ~ DEL - UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_HASH, KC_DEL}; + UK_X, UK_Y, UK_Z, UK_LBRC, UK_BSLS, UK_RBRC, UK_HASH, KC_DEL +}; -- cgit v1.2.3