Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Possible bug with windows and a German keyboard layout

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    3

    Possible bug with windows and a German keyboard layout

    I recently ran into some problems while using my Teensy 3.0 with a German keyboard layout. The Problem however only occurs on windows machines, on Linux machines everything works fine. It seems that every apostrophe turns into acute accents and sometimes even this "" character I have never seen before.
    This is from the layout test run on a Linux machine:

    Symbols1: !"#$%&'()*+,-./

    And this from a computer running windows 7:

    Symbols1: !"#$%&()*+,-./

    Here is the environment I am using:

    -Arduino 1.0.3 + Teensyduino 1.13 (Linux)
    -USB type: "Keyboard + Mouse + Joystick"
    -Keyboard Layout: "German"
    -Teensy 3.0

    I am not really sure if this is even a bug on the teensy side and not on the windows side, but I thought I'd let you know anyway and hope that someone might be able to help me with my problem.

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    What is receiving and displaying the text, on the computer? Is it the Arduino serial monitor, a terminal, a text editor or wordprocessor?

  3. #3
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    It looks as if there is a bug in the German, German_Mac and Canadian French layouts. In hardware/teensy/cores/teensy3/keylayouts.h the value for ASCII_27 has been copied from the US_International layout (where the ' key is used as a combining accent).
    Code:
    #define ASCII_27	ACUTE_ACCENT_BITS + KEY_SPACE		// 39 '
    but it does not apply to those other layouts.

    US_international: http://en.wikipedia.org/wiki/File:KB...ernational.svg
    German QWERTZ: http://en.wikipedia.org/wiki/File:KB_Germany.svg
    Canadian french: http://en.wikipedia.org/wiki/File:KB...rench_text.svg

    US International:
    http://en.wikipedia.org/wiki/QWERTY#US-International
    A diacritic key is activated by pressing and releasing it, then pressing the letter that requires a diacritic. After the two strokes, the single character with diacritics is generated. Note that only certain letters, such as vowels and "n", can have diacritics in this way. To generate the symbols ', `, ", ^ and ~, when the following character is capable of having a diacritic, press the Spacebar after the key.
    This explains the acute accent plus space in the US_International layout. I will try to do some more checks on the german, German_Mac and Canadian_French layouts as there may be other related errors.

    So far unexplained, is why the expected (correct) result is obtained on Linux, since the same teensy code is running.

  4. #4
    Junior Member
    Join Date
    May 2013
    Posts
    3
    It doesn't matter which program is receiving, it's always the same result. Thank you for your help so far, the information you gave might even be sufficient enough for me to temporarily work around the problem.

  5. #5
    Hi !
    any suggestions , how i can solve this ?? even temporarly ?
    i looked at the ascii codes , but i dont know, which key i assign to ascii #27 in german layout.
    thanx alot

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,770
    Please give this file a try. Extract the zip file and copy keylayouts.h to hardware/teensy/cores/teensy3.
    Attached Files Attached Files

  7. #7
    Wow . this is working !!!!
    thanx alot for your very fast answer .

  8. #8
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Great, everything is working fine now. Thank you very much!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •