Details
Edit: Just to clear it up, the opposite hooks are called for these keys.
Working on a tool that uses a DLL to run gameui_preventescapetoshow and gameui_allowescapetoshow. The DLL isn't important here, but it made me realize that ESCAPE and TILDE do not seem to trigger PANEL:OnKeyCodePressed and PANEL:OnKeyCodeReleased properly. I am detecting these to handle the input depending on if the DLL is enabled. When writing in the support for that I realized ESCAPE was not closing my frame. Then I realized that PANEL:OnKeyCodePressed was not being called for that key.
If this was by design I think it should either check the status of gameui_preventescapetoshow or not change it's behavior at all.
Steps to reproduce
Run this to get a focused frame and press some buttons:
lua_run_cl TEST = vgui.Create('DFrame') TEST:MakePopup() TEST.OnKeyCodePressed = function(_, k) print('Pressed '..k) end TEST.OnKeyCodeReleased = function(_, k) print('Released '..k) end TEST:RequestFocus()