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:
parent
c108caf865
commit
6faa5c3d74
@ -85,13 +85,14 @@ TextControlCompleter::~TextControlCompleter()
|
||||
filter_result
|
||||
TextControlCompleter::Filter(BMessage* message, BHandler** target)
|
||||
{
|
||||
int32 rawChar, modifiers;
|
||||
if (!target || message->FindInt32("raw_char", &rawChar) != B_OK
|
||||
const char* bytes;
|
||||
int32 modifiers;
|
||||
if (!target || message->FindString("bytes", &bytes) != B_OK
|
||||
|| message->FindInt32("modifiers", &modifiers) != B_OK) {
|
||||
return B_DISPATCH_MESSAGE;
|
||||
}
|
||||
|
||||
switch (rawChar) {
|
||||
switch (bytes[0]) {
|
||||
case B_UP_ARROW:
|
||||
SelectPrevious();
|
||||
return B_SKIP_MESSAGE;
|
||||
|
Loading…
Reference in New Issue
Block a user