Skip to content
Snippets Groups Projects
Commit 70681603 authored by DarkGod's avatar DarkGod
Browse files

test

parent 62f862e5
No related branches found
No related tags found
No related merge requests found
...@@ -132,14 +132,11 @@ function _M:generate() ...@@ -132,14 +132,11 @@ function _M:generate()
elseif core.webview.kind == "cef3" then elseif core.webview.kind == "cef3" then
function self.key.receiveKey(_, sym, ctrl, shift, alt, meta, unicode, isup, key, ismouse, keysym) function self.key.receiveKey(_, sym, ctrl, shift, alt, meta, unicode, isup, key, ismouse, keysym)
if not self.view then return end if not self.view then return end
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", isup, keysym)
if unicode then if unicode then
keysym = unicode:sub(1):byte() keysym = unicode:sub(1):byte()
print("==uni", keysym, unicode)
self.view:injectKey(true, keysym, 0, unicode) self.view:injectKey(true, keysym, 0, unicode)
return return
end end
print("==not", keysym)
self.view:injectKey(isup, keysym, 0, "") self.view:injectKey(isup, keysym, 0, "")
end end
end end
......
...@@ -180,7 +180,7 @@ static int lua_web_inject_key(lua_State *L) { ...@@ -180,7 +180,7 @@ static int lua_web_inject_key(lua_State *L) {
const char *uni = NULL; const char *uni = NULL;
size_t unilen = 0; size_t unilen = 0;
if (lua_isstring(L, 5)) uni = lua_tolstring(L, 5, &unilen); if (lua_isstring(L, 5)) uni = lua_tolstring(L, 5, &unilen);
printf("???=== %d\n", scancode);
te4_web_inject_key(view, scancode, asymb, uni, unilen, up); te4_web_inject_key(view, scancode, asymb, uni, unilen, up);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment