garrysmod-issues
garrysmod-issues copied to clipboard
chromium OnKeyCodePressed isn't being called anymore
PANEL:OnKeyCodePressed is no longer called on DHTML or Awesomium/Chromium Panels on the chromium branch.
I don't think PANEL:OnKeyCodeReleased ever worked with Awesomium, but the script here prints key codes pressed on stable branch.
local a = vgui.Create("DHTML") timer.Simple(10, function() a:Remove() end)
a:SetPos(0, 0)
a:SetSize(200, 200)
a:SetHTML[[<html><body style="background-color: white"></body></html>]]
a:SetVisible(true)
a:MakePopup()
a.OnKeyCodePressed = chat.AddText
chromium/180331 Thanks!
That's because they're used by Chromium. It'd probably be sensible to call in to the base Lua functions though.