[haiku-webkit-commits] r302 - webkit/trunk/WebKit/haiku/WebPositive/autocompletion

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Tue, 09 Mar 2010 09:26:45 +0000

Author: stippi
Date: Tue Mar  9 09:26:44 2010
New Revision: 302
URL: http://mmlr.dyndns.org/changeset/302

Log:
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.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/autocompletion/TextControlCompleter.cpp

Modified: 
webkit/trunk/WebKit/haiku/WebPositive/autocompletion/TextControlCompleter.cpp
==============================================================================
--- 
webkit/trunk/WebKit/haiku/WebPositive/autocompletion/TextControlCompleter.cpp   
    Tue Mar  9 00:35:39 2010        (r301)
+++ 
webkit/trunk/WebKit/haiku/WebPositive/autocompletion/TextControlCompleter.cpp   
    Tue Mar  9 09:26:44 2010        (r302)
@@ -85,13 +85,14 @@
 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;

Other related posts:

  • » [haiku-webkit-commits] r302 - webkit/trunk/WebKit/haiku/WebPositive/autocompletion - webkit