Frame.Event:KeyDown()

From Riftui Wiki

Jump to: navigation, search

This function is triggered when key is pressed inside the frame.

Contents

Signature

function frame.Event:KeyDown(button)
       ...
end

Parameters

button

Return Value

The key or keys pressed on the keyboard

Example

local context = UI.CreateContext("SampleContext")
local frame = UI.CreateFrame("Frame", "SampleFrame", context)
 
-- Overload the KeyDown function --
function frame.Event:KeyDown(button)
       -- Print out KeyDown! --
       if button == "Alt" then
           print("Alt key pressed!")
       end
end
Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox