garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

chromium OnKeyCodePressed isn't being called anymore

Open SpiralP opened this issue 7 years ago • 1 comments

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!

SpiralP avatar Jul 24 '18 06:07 SpiralP

That's because they're used by Chromium. It'd probably be sensible to call in to the base Lua functions though.

sohpeach avatar Jul 24 '18 12:07 sohpeach