sagnitude / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

constants provided by cefpython do not match values of cef_key_type_t enum #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
as title says \o/

code:
print cefpython.KEYEVENT_KEYUP
print cefpython.KEYEVENT_KEYDOWN
print cefpython.KEYEVENT_CHAR

produces:
2
1
3

however output should be:
0
1
2
according to this: 
https://code.google.com/searchframe#SgTHaFLUelA/trunk/include/cef_types.h&q=KT_K
EYUP%20package:chromiumembedded%5C.googlecode%5C.com&l=334

Original issue reported on code.google.com by roxaz...@gmail.com on 27 Dec 2012 at 5:56

GoogleCodeExporter commented 9 years ago
KEYEVENT_ constants are related to KeyboardHandler.OnKeyEvent callback:

  cefpython.KEYEVENT_RAWKEYDOWN
  cefpython.KEYEVENT_KEYDOWN
  cefpython.KEYEVENT_KEYUP
  cefpython.KEYEVENT_CHAR

What you're looking for is KEYTYPE_ constants that you pass to 
Browser.SendKeyEvent():

  cefpython.KEYTYPE_KEYUP
  cefpython.KEYTYPE_KEYDOWN
  cefpython.KEYTYPE_CHAR

Original comment by czarek.t...@gmail.com on 27 Dec 2012 at 6:35

GoogleCodeExporter commented 9 years ago
oh im sorry, py files have them missing, that was the reason of my confusion

Original comment by roxaz...@gmail.com on 27 Dec 2012 at 6:43