Fandom

WoWWiki

UIHANDLER OnEnterPressed

104,634pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Widget handlers < OnEnterPressed

Description Edit

Icon-edit-22x22
Note: This is a generic section stub. You can help expand it by clicking Sprite-monaco-pencil Edit to the right of the section title.

EditBox:OnEnterPressed()

Arguments Edit

Icon-edit-22x22
Note: This is a generic section stub. You can help expand it by clicking Sprite-monaco-pencil Edit to the right of the section title.

Example Edit

Icon-edit-22x22
Note: This is a generic section stub. You can help expand it by clicking Sprite-monaco-pencil Edit to the right of the section title.
EditBox:SetScript("OnEnterPressed", function(self)
    self:ClearFocus(); -- clears focus from editbox, (unlocks key bindings, so pressing W makes your character go forward.
    ChatFrame1EditBox:SetFocus(); -- if this is provided, previous line is not needed (opens chat frame)
end);

If you want to open chat frame when pressing enter instead of adding a new line, then add this script to your EditBox frame.

Also on Fandom

Random Wiki