Compare commits

...

2 Commits

Author SHA1 Message Date
George Sokianos ff3e5282f6 Changed the OS4 release package name 2022-06-04 22:47:22 +01:00
George Sokianos 89e2defb5b Fixed numpad usage 2022-05-02 17:50:42 +01:00
2 changed files with 8 additions and 1 deletions

View File

@ -78,5 +78,5 @@ release:
cp README.md release/LiteXL2/
cp README_OS4.md release/LiteXL2/
cp LICENSE release/LiteXL2/
lha -aeqr3 a LiteXL2.lha release/
lha -aeqr3 a LiteXL2_OS4.lha release/

View File

@ -101,6 +101,8 @@ static const char *numpad[] = { "end", "down", "pagedown", "left", "", "right",
static const char *get_key_name(const SDL_Event *e, char *buf) {
SDL_Scancode scancode = e->key.keysym.scancode;
#if !defined(__amigaos4__) && !defined(__MORPHOS__)
/* Is the scancode from the keypad and the number-lock off?
** We assume that SDL_SCANCODE_KP_1 up to SDL_SCANCODE_KP_9 and SDL_SCANCODE_KP_0
** and SDL_SCANCODE_KP_PERIOD are declared in SDL2 in that order. */
@ -108,6 +110,8 @@ static const char *get_key_name(const SDL_Event *e, char *buf) {
!(e->key.keysym.mod & KMOD_NUM)) {
return numpad[scancode - SDL_SCANCODE_KP_1];
} else {
#endif
/* We need to correctly handle non-standard layouts such as dvorak.
Therefore, if a Latin letter(code<128) is pressed in the current layout,
then we transmit it as it is. But we also need to support shortcuts in
@ -119,7 +123,10 @@ static const char *get_key_name(const SDL_Event *e, char *buf) {
strcpy(buf, SDL_GetScancodeName(scancode));
str_tolower(buf);
return buf;
#if !defined(__amigaos4__) && !defined(__MORPHOS__)
}
#endif
}
static int f_poll_event(lua_State *L) {