FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/cefpython/keyboard_handler_cef1.pyx at cefpython31 · pythonthings/cefpython · GitHub
pythonthings
cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
cefpython
/
keyboard_handler_cef1.pyx
Copy path
More file actions
More file actions
Latest commit
History
History
History
42 lines (39 loc) · 1.33 KB
Breadcrumbs
cefpython
/
cefpython
/
keyboard_handler_cef1.pyx
Copy path
File metadata and controls
42 lines (39 loc) · 1.33 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
Copyright (c) 2012-2014 The CEF Python authors. All rights reserved.
#
License: New BSD License.
#
Website: http://code.google.com/p/cefpython/
KEYEVENT_RAWKEYDOWN
=
cef_types.KEYEVENT_RAWKEYDOWN
KEYEVENT_KEYDOWN
=
cef_types.KEYEVENT_KEYDOWN
KEYEVENT_KEYUP
=
cef_types.KEYEVENT_KEYUP
KEYEVENT_CHAR
=
cef_types.KEYEVENT_CHAR
KEY_NONE
=
0
KEY_SHIFT
=
cef_types.KEY_SHIFT
KEY_CTRL
=
cef_types.KEY_CTRL
KEY_ALT
=
cef_types.KEY_ALT
KEY_META
=
cef_types.KEY_META
KEY_KEYPAD
=
cef_types.KEY_KEYPAD
cdef public cpp_bool KeyboardHandler_OnKeyEvent(
CefRefPtr[CefBrowser] cefBrowser,
cef_types.cef_handler_keyevent_type_t eventType,
int
code,
int
modifiers,
cpp_bool isSystemKey,
cpp_bool isAfterJavascript
)
except
*
with
gil:
cdef PyBrowser pyBrowser
cdef
object
callback
try
:
pyBrowser
=
GetPyBrowser(cefBrowser)
callback
=
pyBrowser.GetClientCallback(
"
OnKeyEvent
"
)
if
callback:
return
bool
(callback(
pyBrowser,
<
int
>
eventType,
code,
modifiers,
isSystemKey,
isAfterJavascript))
else
:
return
False
except
:
(exc_type, exc_value, exc_trace)
=
sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)
Back
|
FazBrowse Home
|
New Git URL