Seytonic / malduino

All the Malduinos!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

German keyboard layout issue with Backslash "\" [FIXED IN PR #8]

MarvinJWendt opened this issue · comments

I noticed that
STRING \ results in a written ß.
I have the current keyboard layout (Malduino setup was today) and STRING Z returns Z (the proof that the layout is installed correctly)

The keyboard layout used on my PC is: DEU - Deutsch (Deutschland) which is the standard one in germany.

The backslash is typed: STRG+ALT+ß or AltGr+ß
The ALT-Code for the backslash is 92

In the C++ file the code 92 is mapped as 0x2d, // bslash
and _altGrMap[92] = true; // bslash <-- This is right, but it doesn´t seem to be working right.

Quick fix (for people with working alt-codes):

STRING text\text2
->

STRING text
ALT NUM_9 NUM_2
STRING text2

Alt-codes are not working for me, but that´s not related to the Malduino.
Still I found a way around it while selecting files.

Maybe @spacehuhn can test/confirm it :)
Demo

//EDIT: Grammar

Use AltGr+ß like you would on a real keyboard. There is no fix for that because \ isn't a key on the German keyboard layout. You have to press a combination of keys.

By the way, some other special keys might have the same behavior.
That's why we built in the ALT-code converter, so all special characters work atleast on windows with every layout.

I was thinking about adding a fix in the converter and/or the keyboard layout which translates \ into the AltGr+ß combination
(PS: How do you write AltGr+ß in DuckyScript? ALTGR ß is typing a +)

Oh sorry the trick was ALTGR \ that should do it.

Okay now I found a solution:
ALTGR \ --> ß (Not working)
ALT CONTROL \ --> \ (working)
CONTROL ALT \ --> \ (working)

So I think the issue is that the AltGr key is not working properly.
(When I type it manually it is working, so I haven´t disabled the key in windows)

The best way would obviously be to fix the AltGr key so it would also work in a STRING \ example - since it´s mapped as _altGrMap[92] = true; // bslash in the layout, this should work.

An easier but less effective solution would be adding it to the converter:

STRING file\path
-->
STRING file
CONTROL ALT \
STRING path

UPDATE: Issue is fixed.
I added/removed some lines in the Keyboard.cpp.

STRING \ @ { [ ] }
is now giving out:
\ @ { [ ] }

The change fixes the AltGr compatibility and makes every character possible in a STRING command.

There is no fix for that because \ isn't a key on the German keyboard layout. You have to press a combination of keys.

--> The combination is now automatically pressed for those keys.

@Seytonic @spacehuhn I created a pull-request from my forked copy. Also I added support to the converter.
Pull-Request --> #8