Skip to content

Commit

Permalink
trs80: put the AZERTY configuration into the config.h file instead
Browse files Browse the repository at this point in the history
  • Loading branch information
EtchedPixels committed Feb 5, 2025
1 parent b79b126 commit 6c5fbd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Kernel/platform/platform-trs80/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#define CONFIG_RTC
#define CONFIG_RTC_FULL
#define CONFIG_RTC_INTERVAL 10 /* fast RTC */

/* Set this for AZERTY keyboard handling */
#undef CONFIG_AZERTY

/* Enable to make ^Z dump the inode table for debug */
#undef CONFIG_IDUMP
/* Enable to make ^A drop back into the monitor */
Expand Down
8 changes: 3 additions & 5 deletions Kernel/platform/platform-trs80/devtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#include <devinput.h>
#include <stdarg.h>

//#define AZERTY // uncomment this for AZERTY keyboards

static char tbuf1[TTYSIZ];
static char tbuf2[TTYSIZ];
static char tbuf3[TTYSIZ];
Expand Down Expand Up @@ -248,7 +246,7 @@ static void keyproc(void)
}

uint8_t keyboard[8][8] = {
#ifdef AZERTY
#ifdef CONFIG_AZERTY
{'>', 'q', 'b', 'c', 'd', 'e', 'f', 'g' },
{'h', 'i', 'j', 'k', 'l', ',', 'n', 'o' },
{'p', 'a', 'r', 's', 't', 'u', 'v', 'z' },
Expand All @@ -270,7 +268,7 @@ uint8_t keyboard[8][8] = {
};

uint8_t shiftkeyboard[8][8] = {
#ifdef AZERTY
#ifdef CONFIG_AZERTY
{'<', 'Q', 'B', 'C', 'D', 'E', 'F', 'G' },
{'H', 'I', 'J', 'K', 'L', '?', 'N', 'O' },
{'P', 'A', 'R', 'S', 'T', 'U', 'V', 'Z' },
Expand Down Expand Up @@ -322,7 +320,7 @@ static void keydecode(void)
with control */
if (keymap[7] & 4) { /* control */
m |= KEYPRESS_CTRL;
#ifdef AZERTY
#ifdef CONFIG_AZERTY
if (!(keymap[7] & 3)) { /* no shift */
if (c == '&')
c = '|';
Expand Down

0 comments on commit 6c5fbd7

Please sign in to comment.