-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with german keyboardlayout #558
Comments
@Retro1968 Could you please confirm if the german layout looks like the photo below? What happens if you press Shift-3 in Amiga emulation? |
Thanks for confirming. Could you try running |
@Retro1968 |
Just load the german keyboard layout in Preferences->Input in Workbench 3.1.4.1. Then press "#" where it would be on the german keyboard. But i can test it for you too. |
It seems that the solution is no easy task. |
On the norwegian layout I have to press alt-gr+shift+3 - does that work for you? |
Yes that works. Thx. |
@Retro1968 From the description I found there:
|
And there seems to be a newer one included there as well: There's a readme included in the archive, test with this and see if it helps? |
I'm working on adding some support for the German layout, based on what I saw in WinUAE itself. |
RPi 4B, RetroPie 4.6.6, amiberry 3.3, AmigaOS 3.1.4.1. Sorry for my late feedback. I was able to successfully test the keymap "WinUAE_D" from the file "german_KeyMap_new.zip" in amiberry. The # key now works correctly. Thank you |
@Retro1968 |
There is a problem. I am currently testing. The keymap setting was gone after a restart and # no longer worked. So I set and saved WinUAE_D again. After that, AmigaOS 3.1.4.1 crashes. |
OK. Here is the result. WinUAE_D corrects the # key. But if you start AmigaOS 3.1.4.1 again it crashes. So WinUAE_D cannot be used for amiberry. |
Raspberry Pi 4B, Manjaro Linux, amiberry 3.3 64-bit, Amiga OS 3.1.4.1. Surprisingly, WinUAE_D works great with the 64 bit version of amiberry. I'll see if the 32-bit version crash is due to JIT. |
Yep.... its JIT that crashes WINUAE_D under amiberry 32-Bit. |
The keymap "UAE_German" does not solve the error with the # key. |
This is a hack coming from WinUAE, hopefully gets the job done however
@Retro1968 |
The "#" key now works. Thank you. :-) |
Awesome, thanks for confirming! |
Thank you for your great work, buddy. :-) |
key 0x2B is NUMBERSIGN ..aka: the hash (#) key -- this isn't actually available on an Amiga keyboard (and with a US keymap, this would be Shift+3 on that kbd to get #...which is not recognized) ... odd one ... |
please see the pics of the A1200 above, this key is investigating that case with gdb: but ... SDL_scancode.h says: SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
* key on ISO keyboards and at the right end
* of the QWERTY row on ANSI keyboards.
* Produces REVERSE SOLIDUS (backslash) and
* VERTICAL LINE in a US layout, REVERSE
* SOLIDUS and VERTICAL LINE in a UK Mac
* layout, NUMBER SIGN and TILDE in a UK
* Windows layout, DOLLAR SIGN and POUND SIGN
* in a Swiss German layout, NUMBER SIGN and
* APOSTROPHE in a German layout, GRAVE
* ACCENT and POUND SIGN in a French Mac
* layout, and ASTERISK and MICRO SIGN in a
* French Windows layout.
*/ Edit 1: |
Yeah, that looks like it ... midwan will have to dig into it =) |
the scancode is modified in function keyhack() ! introduced in PR #91 if (!keyboard_german)
return scancode;
if (scancode == SDL_SCANCODE_BACKSLASH)
{
...
|
@agreppin |
The whole thing is rather ugly, perhaps it can be improved.
Which matches the A1200 photo seen above. How does your keyboard layout look like? |
still investigating here ... for sure, keyboard_german is true for all QWERTZ keyboard layouts, that is central europe. my keyboard layout is Swiss (French) bypassing that german hack reveal another problem down to the retroarch stuff Edit 1: Edit 2: Edit 3: link to pictures with RAWKEYs Edit 4: rectification, it's Amiga RAWKEY 2B, not 2C |
getting closer with those 2 changes: diff --git a/src/osdep/amiberry_input.cpp b/src/osdep/amiberry_input.cpp
index 63f449bd..f8fcda2c 100644
--- a/src/osdep/amiberry_input.cpp
+++ b/src/osdep/amiberry_input.cpp
@@ -365,7 +365,7 @@ int keyhack (const int scancode, const int pressed, const int num)
}
}
- if (!keyboard_german)
+ if (1 || !keyboard_german)
return scancode;
if (scancode == SDL_SCANCODE_BACKSLASH)
diff --git a/src/osdep/keyboard.cpp b/src/osdep/keyboard.cpp
index 4bd72c2c..3110a2f2 100644
--- a/src/osdep/keyboard.cpp
+++ b/src/osdep/keyboard.cpp
@@ -120,7 +120,7 @@ static struct uae_input_device_kbr_default keytrans_amiga[] = {
{ SDL_SCANCODE_APOSTROPHE, INPUTEVENT_KEY_SINGLEQUOTE },
{ SDL_SCANCODE_GRAVE, INPUTEVENT_KEY_BACKQUOTE },
- { SDL_SCANCODE_BACKSLASH, INPUTEVENT_KEY_BACKSLASH },
+ { SDL_SCANCODE_BACKSLASH, INPUTEVENT_KEY_2B },
{ SDL_SCANCODE_COMMA, INPUTEVENT_KEY_COMMA },
{ SDL_SCANCODE_PERIOD, INPUTEVENT_KEY_PERIOD },
{ SDL_SCANCODE_SLASH, INPUTEVENT_KEY_DIV }, Status:
SHIFT+KEY_2B generates not event ATM. |
WinUAE uses F11 for the Backslash key, which I always found weird (and that's the reason it's mapped to ...Backslash in Amiberry). Besides that, WinUAE has the "keyboard_german" disabled completely, but I'm not sure how that translates regarding the German layout (as mentioned in the original post of this issue, above). The problem here seems to be that Amiberry detects your layout as "german", due to it being QWERTZ, and enables the hack that changes those special scancodes on the fly. I think we either need a better detection for that hack (e.g. it's not enough that the layout is QWERTZ), or go the WinUAE way, removing that part completely and changing the mapping of Backslash. However, in WinUAE's case, Backslash is not mapped to How have you set things up in WinUAE to make it work? How was the host OS configured regarding this? |
the Amiga RAWKEY codes #define AK_BACKSLASH 0x0D
#define AK_QUOTE 0x2A
#define AK_NUMBERSIGN 0x2B 0x0D is the key to the left of On US ANSI, the backslash key, just above the enter key should also be SDL_SCANCODE_BACKSLASH but should be mapped to Amiga RAWKEY 0x0D, the dilemma for PC105 keyboards.
Handling those is then made on Amiga side with keymaps. WinUAE has no trace of SDL_SCANCODE_BACKSLASH in it's source code. |
WinUAE does not use SDL2, but DirectInput |
Here is a little program I use for testing on Amiga side: ktest.tar.gz PS: |
…558) - Map the keys exactly like WinUAE (F11 for Backslash) - Disable german keyboard hack
With the commit above, the mapping is now identical to that of WinUAE. This includes disabling the "german keyboard" hack as well. @agreppin / @Retro1968 kindly test after these changes and let me know if anything broke? |
That solution is fine ! I can't test it fully as my Ubuntu 24.04 SDL2 refuses to act on some keys today 🐛. 🐛 the 3 keys bottom left of Return |
Closing this again for now then, we'll see how it goes. |
Hello i use amiberry 3.0.11 on a Raspberry Pi 4. RetroPie 4.5.3 is installed manually on Raspbian Buster.
I use AmigaOS 3.1.4.1 with Kickrom 3.1.4.
Here i use the german keyboardlayout. In this there is an error while using amiberry. On a real Amiga 1200 this problem is not there: If i press the "#" key i get a backslash. There is no keycombination in the german keyboardlayout that results in the output of "#".
I need the "#" for the command: protect dh0:#? +wd all
Kind Regards
Retro1968
The text was updated successfully, but these errors were encountered: