Keypad extended

pull/166/merge
erikkaashoek 3 weeks ago
parent f5d5bed54c
commit dda6f4ac8f

@ -727,8 +727,9 @@ extern const uint8_t numfont16x22[];
#define KP_Y_OFFSET 0 // numeric keypad Y offset
#define KPF_WIDTH (LCD_WIDTH / 10) // text keypad button width
#define KPF_HEIGHT KPF_WIDTH // text keypad button height
#define KPF_ROWS 5 // text keypad rows (symbols, digits, 3 letter rows)
#define KPF_X_OFFSET 0 // text keypad X offset
#define KPF_Y_OFFSET (LCD_HEIGHT - NUM_INPUT_HEIGHT - 4 * KPF_HEIGHT) // text keypad Y offset
#define KPF_Y_OFFSET (LCD_HEIGHT - NUM_INPUT_HEIGHT - KPF_ROWS * KPF_HEIGHT) // text keypad Y offset
#define S_ENTER "\026" // 0x16
#define S_DELTA "\027" // 0x17

13
ui.c

@ -1403,12 +1403,15 @@ static const keypads_t keypads_time[] = {
};
#ifdef __USE_SD_CARD__
// Symbols on the top row are all legal in FAT long file names
// ( '"', '*', '/', ':', '<', '>', '?', '\' and '|' are rejected by FatFs )
static const keypads_t keypads_text[] = {
{40, TXT_KEYBOARD }, // size and position
{0x00, '1'}, {0x10, '2'}, {0x20, '3'}, {0x30, '4'}, {0x40, '5'}, {0x50, '6'}, {0x60, '7'}, {0x70, '8'}, {0x80, '9'}, {0x90, '0'},
{0x01, 'Q'}, {0x11, 'W'}, {0x21, 'E'}, {0x31, 'R'}, {0x41, 'T'}, {0x51, 'Y'}, {0x61, 'U'}, {0x71, 'I'}, {0x81, 'O'}, {0x91, 'P'},
{0x02, 'A'}, {0x12, 'S'}, {0x22, 'D'}, {0x32, 'F'}, {0x42, 'G'}, {0x52, 'H'}, {0x62, 'J'}, {0x72, 'K'}, {0x82, 'L'}, {0x92, '_'},
{0x03, '-'}, {0x13, 'Z'}, {0x23, 'X'}, {0x33, 'C'}, {0x43, 'V'}, {0x53, 'B'}, {0x63, 'N'}, {0x73, 'M'}, {0x83, C_LARROW}, {0x93, C_ENTER},
{50, TXT_KEYBOARD }, // size and position
{0x00, '.'}, {0x10, ','}, {0x20, '('}, {0x30, ')'}, {0x40, '['}, {0x50, ']'}, {0x60, '+'}, {0x70, '&'}, {0x80, '#'}, {0x90, '@'},
{0x01, '1'}, {0x11, '2'}, {0x21, '3'}, {0x31, '4'}, {0x41, '5'}, {0x51, '6'}, {0x61, '7'}, {0x71, '8'}, {0x81, '9'}, {0x91, '0'},
{0x02, 'Q'}, {0x12, 'W'}, {0x22, 'E'}, {0x32, 'R'}, {0x42, 'T'}, {0x52, 'Y'}, {0x62, 'U'}, {0x72, 'I'}, {0x82, 'O'}, {0x92, 'P'},
{0x03, 'A'}, {0x13, 'S'}, {0x23, 'D'}, {0x33, 'F'}, {0x43, 'G'}, {0x53, 'H'}, {0x63, 'J'}, {0x73, 'K'}, {0x83, 'L'}, {0x93, '_'},
{0x04, '-'}, {0x14, 'Z'}, {0x24, 'X'}, {0x34, 'C'}, {0x44, 'V'}, {0x54, 'B'}, {0x64, 'N'}, {0x74, 'M'}, {0x84, C_LARROW}, {0x94, C_ENTER},
};
#endif

Loading…
Cancel
Save

Powered by TurnKey Linux.