Tuesday, 22 December 2020

[Rpcemu] A few problems and a patch

diff -r 00a162d7e6cd src/qt5/keyboard_win.c
--- a/src/qt5/keyboard_win.c Wed May 06 20:17:33 2020 +0100
+++ b/src/qt5/keyboard_win.c Mon Dec 21 22:19:18 2020 +0100
@@ -86,6 +86,7 @@
{ 0x37, { 0x7c } }, // Keypad *

{ 0x38, { 0x11 } }, // Left Alt
+ { { 0xe0, 0x38 }, { 0xe0, 0x11 } }, // Right Alt
{ 0x39, { 0x29 } }, // Space
{ 0x3a, { 0x58 } }, // Caps Lock

@@ -147,7 +148,7 @@
keyboard_map_key(uint32_t native_scancode)
{
size_t k;
-
+
for (k = 0; key_map[k].native_scancode != 0; k++) {
if (key_map[k].native_scancode == native_scancode) {
return key_map[k].set_2;
diff -r 00a162d7e6cd src/qt5/keyboard_x.c
--- a/src/qt5/keyboard_x.c Wed May 06 20:17:33 2020 +0100
+++ b/src/qt5/keyboard_x.c Mon Dec 21 22:19:18 2020 +0100
@@ -124,6 +124,7 @@
{ 0x69, { 0xe0, 0x14 } }, // Right Ctrl
{ 0x6a, { 0xe0, 0x4a } }, // Keypad /

+ { 0x6c, { 0xe0, 0x11 } }, // Right Alt
{ 0x6e, { 0xe0, 0x6c } }, // Home
{ 0x6f, { 0xe0, 0x75 } }, // Up
{ 0x70, { 0xe0, 0x7d } }, // Page Up
Hi,

I recently set up RPCEmu 0.9.3 on a GNU/Linux host system (Ubuntu 20.04)
as DDE build environment (using the Easy-Start bundle for ROD) it seems
to work well except for three things:

- Middle clicking requires repeated attempts (double or triple clicking,
sometimes more)
- AltGr is not recognised as right-Alt (this is used a lot on many
European keyboards)
- Whenever I use the shift key, it sticks until I switch focus to the
host system and go back again. (It's not Caps Lock, but actually shift,
since ' turns into @ etc.)

On advice from the !ChatCube RISCOS Support channel I've tried with
"Reduce CPU Usage" enabled and disabled, with no discernable difference.
I've now tried in both the RO371 and RO5D Easy-Start bundles, with both
the interpreter and recompiler version of RPCEmu, with the same result.
I've also tried both with builds from the source bundle for 0.9.3 and
with a freshly checked out master from hg, again with the same result.

After some discussion on the ROOL forums, I've solved the first issue by
using the two-button mouse mode, which doesn't have this problem. Its a
pity to not have the adjust button, but so it goes. The second issue
I've solved by adding AltGr (RAlt) to the key map in the source. I'm
supplying a patch for both the x and Windows keymaps, though please note
that I haven't been able to test the Windows-version.

I have no idea what might be happening with the shift-lock thing,
however. Any ideas?

Kind regards,

Andreas

No comments:

Post a Comment