Use the "bytes" member from the keydown message in order to get mapped keys.

The 8 and 2 on the number pad would not work in the URL bar otherwise, since
those map to "B_UP_ARROW" and "B_DOWN_ARROW" as raw char.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@302 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi
2012-07-03 15:37:36 +02:00
committed by Alexandre Deckner
parent c108caf865
commit 6faa5c3d74
@@ -85,13 +85,14 @@ TextControlCompleter::~TextControlCompleter()
filter_result filter_result
TextControlCompleter::Filter(BMessage* message, BHandler** target) TextControlCompleter::Filter(BMessage* message, BHandler** target)
{ {
int32 rawChar, modifiers; const char* bytes;
if (!target || message->FindInt32("raw_char", &rawChar) != B_OK int32 modifiers;
if (!target || message->FindString("bytes", &bytes) != B_OK
|| message->FindInt32("modifiers", &modifiers) != B_OK) { || message->FindInt32("modifiers", &modifiers) != B_OK) {
return B_DISPATCH_MESSAGE; return B_DISPATCH_MESSAGE;
} }
switch (rawChar) { switch (bytes[0]) {
case B_UP_ARROW: case B_UP_ARROW:
SelectPrevious(); SelectPrevious();
return B_SKIP_MESSAGE; return B_SKIP_MESSAGE;