Czech keyboard

morfeuski

Member
It is possible add czech keyboard support to teensyduino? Czech keyboard looks like in attached images. The problém is, that my scipts doesnt work, because of bad characters. For example, & is interpreted as 7, 1 as +, 7 as ý, and < as ?. I can use KEYPAD for numbers, but still can't simulate other keys as teensy doesnt support right ALT.
 

Attachments

  • czech_shift.PNG
    czech_shift.PNG
    47.7 KB · Views: 253
  • czech_normal.PNG
    czech_normal.PNG
    46.7 KB · Views: 255
  • czech_alt_gr.PNG
    czech_alt_gr.PNG
    43.8 KB · Views: 219
I need more information about the "dead keys" used.

This Microsoft page shows 1 dead key without modifies, 2 with shift, and 11 with AltGr.

http://msdn.microsoft.com/en-us/goglobal/bb964651.aspx

The really confusing part is some dead keys seem to be duplicated. The acute accept one is show to the left of backspace without modifiers, but it's also the '9' key with AltGr. Likewise, the Caron dead key is shown twice. I need to know which ones are really used? Or is the info on that Microsoft page just wrong?
 
Ok, here's my first (very rough) attempt, with the info I currently have...

To use this, put keylayouts.h into hardware/teensy/cores/teensy3

Then edit hardware/teensy/boards.txt. Add these lines:

Code:
teensy3.menu.keys.usint.name=Czech
teensy3.menu.keys.usint.build.define1=-DLAYOUT_CZECH

Please let me know if this works?
 

Attachments

  • keylayouts.zip
    13.9 KB · Views: 305
These are the keycodes where I had to guess. Please try Keyboard.print() with these characters.

Code:
#define DEADKEY_ACUTE_ACCENT    KEY_EQUAL  // TODO: is it KEY_9 + ALTGR_MASK
#define DEADKEY_DEGREE_SIGN     KEY_TILDE + SHIFT_MASK // TODO: is it KEY_5 + ALTGR_MASK
#define DEADKEY_CARON           KEY_EQUAL + SHIFT_MASK // TODO: is it KEY_2 + ALTGR_MASK

#define ASCII_2A        KEY_SLASH + ALTGR_MASK                  // 42 *  TODO: verify
#define ASCII_2D        KEY_SLASH                               // 45 -  TODO: verify
#define ASCII_5E        CIRCUMFLEX_BITS + KEY_SPACE             // 94 ^  TODO: verify
#define ASCII_5F        KEY_SLASH + SHIFT_MASK                  // 95 _  TODO: verify
#define ASCII_60        GRAVE_ACCENT_BITS + KEY_SPACE           // 96 `  TODO: verify
#define ASCII_7E        KEY_1 + ALTGR_MASK                      // 126 ~  TODO: verify
 
Opps, here's the correct lines to put into hardware/teensy/boards.txt:

Code:
teensy3.menu.keys.cz-cz.name=Czech
teensy3.menu.keys.cz-cz.build.define1=-DLAYOUT_CZECH
 
As I actually have Teensy++ I copied keylaouts to hardware/teensy/cores/teensy a I change your lines to
teensypp2.menu.keys.cz-cz.name=Czech
teensypp2.menu.keys.cz-cz.build.define1=-DLAYOUT_CZECH
It is right?
 
So I tried this program
/* USB Keyboard Layout Test

You must select Keyboard from the "Tools > USB Type" menu

Select the the correct layout from "Tools > Keyboard Layout"

If you discover incorrect results for your country's layout,
please email Paul Stoffregen <paul@pjrc.com> with the results
of this test and an explanation of which keys are wrong. If
your layout is not available, please find the layout which
is closest, and email Paul Stoffregen.
*/

const int ledPin = 6; // Teensy 2.0 = Pin 11, Teensy++ 2.0 = Pin 6

void setup() {
Serial.begin(9600);

// Blink the LED for 10 seconds, to give time to open
// a word processor or text editor to receive the test
pinMode(ledPin, OUTPUT);
for (int i=0; i < 10; i++) {
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
}

// Type all possible characters. Many countries do not use all
// characters. Unsupported characters will be skipped
//
Keyboard.println("Teensy USB Keyboard Layout Test");
delay(100);
Keyboard.println("Lowercase: abcdefghijklmnopqrstuvwxyz");
delay(100);
Keyboard.println("Uppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ");
delay(100);
Keyboard.println("Numbers: 0123456789");
delay(100);
Keyboard.println("Symbols1: !\"#$%&'()*+,-./");
delay(100);
Keyboard.println("Symbols2: :;<=>?[\\]^_`{|}~");
delay(100);
Keyboard.println("Symbols3: ¡¢£¤¥¦§¨©ª«¬*®¯°±");
delay(100);
Keyboard.println("Symbols4: ²³´µ¶·¸¹º»¼½¾¿×÷");
delay(100);
Keyboard.println("Grave: ÀÈÌÒÙàèìòù");
delay(100);
Keyboard.println("Acute: ÁÉÍÓÚÝáéíóúý");
delay(100);
Keyboard.println("Circumflex: ÂÊÎÔÛâêîôû");
delay(100);
Keyboard.println("Tilde: ÃÑÕãñõ");
delay(100);
Keyboard.println("Diaeresis: ÄËÏÖÜäëïöüÿ");
delay(100);
Keyboard.println("Cedilla: Çç");
delay(100);
Keyboard.println("Ring Above: Åå");
delay(100);
Keyboard.println("AE: Ææ");
delay(100);
Keyboard.println("Thorn: Þþ");
delay(100);
Keyboard.println("Sharp S: ß");
delay(100);
Keyboard.println("O-Stroke: Øø");
delay(100);
Keyboard.println("Eth: Ðð");
delay(100);
Keyboard.println("Euro: €");
}

void loop() {
// Do nothing after the test
}
With this outpput
Teensy USB Keyboard Layout Test
Lowercase: abcdefghijklmnopqrstuvwxyz
Uppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Numbers: 0123456789
Symbols1: !§#$%&|()*+,-./
Symbols2: :;<=>?[\]# _& {|}!
Symbols3: /§\
Symbols4: ][
Grave: &A&E&I&O&U&a&e&i&o&u
Acute: áéíý
Circumflex: #A#E#I#O#U#a#e#i#o#u
Tilde:
Diaeresis: \A\E\I\O\U\a\e\i\o\u\y
Cedilla:
Ring Above:
AE:
Thorn:
Sharp S: '
O-Stroke:
Eth:
Euro:
 
Well, it looks like most of the characters are working.

Can you please tell me how you type these characters on your keyboard?

^

`

~

ß

×

÷
 
Here is another update to keylayouts.h. I've tried to fix the characters that printed incorrectly in the reply #9 above.

Please let me know how this works for you? Can you try those 6 keys individually?
 

Attachments

  • keylayouts.zip
    14.1 KB · Views: 167
Here is another update to keylayouts.h. I've tried to fix the characters that printed incorrectly in the reply #9 above.

Please let me know how this works for you? Can you try those 6 keys individually?

Dear Paul, sorry for my really late response. I tried all six characters and it looks like their are fine. Thank you very much, you saved my day ;-)
 
Back
Top