Trinket V5 ATtiny85 TrinketKeyboard.h - Sonderzeichen

Hallo zusammen,

ich versuche die Sonderzeichen (in meinem Fall "") als Tastatureingabe auszugeben.
Normale Buchstaben funktionieren, aber ich bekomme das "
" nicht hin.
In der Bibliothek

finde ich auch "*" nicht.
Wenn PIN 0 getriggert wird, soll das Zeichen * als Tastatureinhabe über USB ausgegeben werden.
Vielen Dank.

Hardware: Adafruit Trinket 5V - 16 MHz - ATtiny85

Hier der Code:

#include <TrinketKeyboard.h>

#define PIN_BUTTON_CAPITAL_A 0
#define PIN_BUTTON_STRING    2

void setup()
{
  // button pins as inputs
  pinMode(PIN_BUTTON_CAPITAL_A, INPUT);
  pinMode(PIN_BUTTON_STRING, INPUT);

  // setting input pins to high means turning on internal pull-up resistors
  digitalWrite(PIN_BUTTON_CAPITAL_A, HIGH);
  digitalWrite(PIN_BUTTON_STRING, HIGH);
  // remember, the buttons are active-low, they read LOW when they are not pressed

  // start USB stuff
  TrinketKeyboard.begin();
}

void loop()
{
  // the poll function must be called at least once every 10 ms
  // or cause a keystroke
  // if it is not, then the computer may think that the device
  // has stopped working, and give errors
  TrinketKeyboard.poll();

  if (digitalRead(PIN_BUTTON_CAPITAL_A) == LOW)
  {
    // this should type a capital A
    TrinketKeyboard.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_A);
    // this releases the key (otherwise it is held down!)
    TrinketKeyboard.pressKey(0, 0);
  }

  if (digitalRead(PIN_BUTTON_STRING) == LOW)
  {
    // type out a string using the Print class
    TrinketKeyboard.print("Hello World!");
  }
}

Eventuell solltest Du von einer nordamerikanischen Tastatur ausgehen, da ist das Sternchen über der 8.

Die Lösung ist Shift mit Sqbrak_right für das *

Da funkt dann möglicherweise noch der deutsche Tastaturtreiber mit rein, weil es die Position der Sterns auf einer deutschen Tastatur ist.

Danke für die Rückmeldung :slightly_smiling_face: