Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#1

WM_KEYDOWN wird nicht ausgelößt

  Alt 7. Mai 2011, 04:51
Habe ein paar probleme mit meinen Keytasten

VK_RIGHT, VK_LEFT, VK_RETURN
werden einfach nicht aufgelößt.

Habe jetzt schon VK_SHIFT für VK_RETURN eingesetzt.
Und muss jetzt feststellen das die beiden VK_RIGHT, VK_LEFT auch nicht funktionieren.

Diese hier funktionieren alle..
Delphi-Quellcode:
procedure PlayStopKeyNote(KeyNote: Integer; Chord: TChord; State: BOOL);
var
  NewNote: Integer;

begin

  case KeyNote of
    ord('Y'): NewNote := 12; // Basenote C1
    ord('S'): NewNote := 13; // C1#
    ord('X'): NewNote := 14; // D1
    ord('D'): NewNote := 15; // D1#
    ord('C'): NewNote := 16; // E1
    ord('V'): NewNote := 17; // F1
    ord('G'): NewNote := 18; // F1#
    ord('B'): NewNote := 19; // G1
    ord('H'): NewNote := 20; // G1#
    ord('N'): NewNote := 21; // A1
    ord('J'): NewNote := 22; // A1#
    ord('M'): NewNote := 23; // H1
    VK_OEM_COMMA: NewNote := 24; // C2
    ord('L'): NewNote := 25; // C2#
    VK_OEM_PERIOD: NewNote := 26; // D2
    VK_OEM_3: NewNote := 27; // D2#
    VK_OEM_MINUS: NewNote := 28; // E2
    ord('Q'): NewNote := 29; // F2
    ord('2'): NewNote := 30; // F2#
    ord('W'): NewNote := 31; // G2
    ord('3'): NewNote := 32; // G2#
    ord('E'): NewNote := 33; // A2
    ord('4'): NewNote := 34; // A2#
    ord('R'): NewNote := 35; // H2
    ord('T'): NewNote := 36; // C3
    ord('6'): NewNote := 37; // C3#
    ord('Z'): NewNote := 38; // D3
    ord('7'): NewNote := 39; // D3#
    ord('U'): NewNote := 40; // E3
    ord('I'): NewNote := 41; // F3
    ord('9'): NewNote := 42; // F3#
    ord('O'): NewNote := 43; // G3
    ord('0'): NewNote := 44; // G3#
    ord('P'): NewNote := 45; // A3
    VK_OEM_4: NewNote := 46; // A3#
    VK_OEM_1: NewNote := 47; // H3
    VK_OEM_PLUS: NewNote := 48; // C4
    else
      exit;
  end;
  if State then
    StartNote(NewNote, integer(Chord))
  else
  StopNote(NewNote, integer(Chord));

end;
Was läuft denn hier wieder schief.
  Mit Zitat antworten Zitat