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

Thread: Teensy LC missing key from latam layout

  1. #1
    Junior Member
    Join Date
    Jun 2019
    Posts
    3

    Teensy LC missing key from latam layout

    Hey everyone!

    I've been quite entertained this last 2 days configuring a Teensy LC in order to make it work with an old notebook keyboard I have. Everything works perfectly except for one thing, the latam-layout (latin american spanish) has an extra key that the us-layout lacks: the "<" , ">" dedicated key.

    I checked the arduino/hardware/teensy/avr/cores/teensy3/keylayouts.h file to see how it was defined, but the value specified is already taken by another key (F6). The relevant part of the code is as follows:

    Code:
    // arduino/hardware/teensy/avr/cores/teensy3/keylayouts.h
    
    #define KEY_F6                  (  63  | 0xF000 )
    
    #ifdef LAYOUT_SPANISH_LATIN_AMERICA
    #define KEY_NON_US_100      63
    
    #define ASCII_3C    KEY_NON_US_100              // 60 <
    #define ASCII_3E    KEY_NON_US_100 + SHIFT_MASK     // 62 >
    
    #endif // LAYOUT_SPANISH_LATIN_AMERICA
    I don't know if I'm ding it right but of course if I associate "63" (the value of KEY_NON_US_100) with the ">/<" key it'll trigger "F6" instead. So my question is, how can I map that missing key from the us-layout?
    I'm using Arduino 1.8.9 and Teensyduino 1.46. All the Board, USB Type and Keyboard layout parameters are well configured.

    Have a great day/evening/night!

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    Does the layout on this page match your keyboard?

    https://docs.microsoft.com/en-us/glo...rds/kbdla.html

    Hover your mouse over the Shift and AltGr to check if all the keys are correct when holding those.

  3. #3
    Junior Member
    Join Date
    Jun 2019
    Posts
    3
    Thanks for the reply
    Yes, that's the very same layout.

    By the way I'm following this guide. The base Arduino code from where I started is this one: Dell_1525_Keyboard.ino, modified accordingly to match my spanish Dell Inspiron 1420 keyboard.

  4. #4
    Junior Member
    Join Date
    Jun 2019
    Posts
    3
    Ups, never mind. Just read that you can pass literals to the Keyboard.press function without any problem. I think I'll go with that approach instead of the micro manager way.
    Thanks anyway

Posting Permissions

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