Text input without MakePopup()

Is it possible to get the keyboard focus for a textbox without using MakePopup()?

Because when using MakePopup() the window will also come up in the esc menu.

Try
[LUA]textbox:RequestFocus()[/LUA]

But if you just want your frame to not show while in the menu, call
[LUA]panel:ParentToHUD()[/LUA]

It is possible to use what rejax posted, if you do RequestFocus the “OnTextEntryGetFocus” hook will be called. you then need to enable keyboard input for the parent panel. I do it like this:

This would be for the main menu panel:
[lua]
local PANEL = {}

–[[---------------------------------------------------------
Name: StartKeyFocus
-----------------------------------------------------------]]
function PANEL:StartKeyFocus( pPanel )
self:SetKeyboardInputEnabled( true )
end

–[[---------------------------------------------------------
Name: EndKeyFocus
-----------------------------------------------------------]]
function PANEL:EndKeyFocus( pPanel )
self:SetKeyboardInputEnabled( false )
end
[/lua]

You then need to enable mouse input when the hook gets called:
In this example Pointshop2.Menu would be an instance of the PANEL above
[lua]
–[[---------------------------------------------------------
Name: HOOK PointshopMenuKeyboardFocusOn
Called when text entry needs keyboard focus
-----------------------------------------------------------]]
local function PointshopMenuKeyboardFocusOn( pnl )
if not ValidPanel( Pointshop2.Menu ) then
return
end

if IsValid( pnl ) and not pnl:HasParent( Pointshop2.Menu ) then 
	return 
end

Pointshop2.Menu:StartKeyFocus( pnl )

end
hook.Add( “OnTextEntryGetFocus”, “PointshopMenuKeyboardFocusOn”, PointshopMenuKeyboardFocusOn )

–[[---------------------------------------------------------
Name: HOOK PointshopMenuKeyboardFocusOff
Called when text entry stops needing keyboard focus
-----------------------------------------------------------]]
local function PointshopMenuKeyboardFocusOff( pnl )
if not ValidPanel( Pointshop2.Menu ) then
return
end

if IsValid( pnl ) and not pnl:HasParent( Pointshop2.Menu ) then 
	return 
end

Pointshop2.Menu:EndKeyFocus( pnl )

end
hook.Add( “OnTextEntryLoseFocus”, “PointshopMenuKeyboardFocusOff”, PointshopMenuKeyboardFocusOff )
[/lua]

This way you can get use text entries and still have keyboard input passed to the game(players can use voice etc). I read through the spawn menu to see how it does it and this is what i found, works good so far.

That helped! Thanks!