Jump to content

Created Czech keyboard layout, having problems with other one though


RiderCZ
 Share

Recommended Posts

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:

  1. Add the QWERTZ layout to distribution as cs-qwertz.properties ?
  2. Help me with the QWERTY one, how to specify the key sequence?

Thanks.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...