RiderCZ Posted January 16, 2015 Posted January 16, 2015 Hi, *! I needed the Czech keyboard layouts for Rubber Ducky, so I created the definition files: Czech (QWERTZ) keyboard - this is most common "official" Czech keyboard layout. The definition file works without problems. Czech (QWERTY) keyboard - this is alternate layout, which is used by lot of people (mainly IT professionals). I have problem with this one. The QWERTY layout differs from QWERTZ not only by swapping Y/Z, but also by completely different way to type special characters. I defined all characters, except the following ones: { - press RIGHT ALT + SHIFT + LEFT BRACE } - press RIGHT ALT + SHIFT + RIGHT BRACE | - press RIGHT ALT + SHIFT + BACKSLASH ~ - press RIGHT ALT + SHIFT + TILDE This is the relevant part of properties file: ASCII_7B = KEY_LEFT_BRACE, MODIFIERKEY_RIGHT_ALT, MODIFIERKEY_SHIFT // 123 { ASCII_7C = KEY_BACKSLASH, MODIFIERKEY_RIGHT_ALT, MODIFIERKEY_SHIFT // 124 | ASCII_7D = KEY_RIGHT_BRACE, MODIFIERKEY_RIGHT_ALT, MODIFIERKEY_SHIFT // 125 } ASCII_7E = KEY_TILDE, MODIFIERKEY_RIGHT_ALT, MODIFIERKEY_SHIFT // 126 ~ I can't figure a way, how to add MODIFIERKEY_RIGHT_ALT and MODIFIERKEY_SHIFT simultaneously. I can do either one, but not both together. I tried various ways how to force this, but none of them worked. I even tried to type the chars using their ASCII codes (like ALT + 1 2 3), but it didn't worked either, I could not figure out how to send several keys in sequence, while holding ALT key. I suppose that guys creating the Norwegian keyboard have the same problem for example with Thorn character, which is defined as "KEY_T, MODIFIERKEY_RIGHT_ALT, MODIFIERKEY_SHIFT" but commented out. Problem is that "my" characters are quite important to type commands, which I suppose Thorn isn't. Can please someone: Add the QWERTZ layout to distribution as cs-qwertz.properties ? Help me with the QWERTY one, how to specify the key sequence? Thanks. Quote
RiderCZ Posted January 16, 2015 Author Posted January 16, 2015 After posting this, I created hacked solution, which is ugly, but works. First, you have to modify keyboard.properties file. You have to add the following constant there: MODIFIERKEY_RIGHT_ALT_SHIFT = 0x42 Then you can use the above constant in the cs-qwerty.properties file. The relevant part of file is: ASCII_7B = KEY_LEFT_BRACE, MODIFIERKEY_RIGHT_ALT_SHIFT // 123 { ASCII_7C = KEY_BACKSLASH, MODIFIERKEY_RIGHT_ALT_SHIFT // 124 | ASCII_7D = KEY_RIGHT_BRACE, MODIFIERKEY_RIGHT_ALT_SHIFT // 125 } ASCII_7E = KEY_TILDE, MODIFIERKEY_RIGHT_ALT_SHIFT // 126 ~ Then you have to recompile the encoder with new resources and it works. I'm not much of Java developer and there is cleaner solution (to support layered modifier keys somehow, because the value of modifier is bit switch anyway), but I'll leave to more seasoned Java programmers. I tested it on V2 of ducky-decode encoder, because V3 is kind of complicated for me with its ducklings. If you want to download my fork, it's all here. But I hope my change will get merged to upstream version soon. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.