Hello,
I noticed that I can't get the keycodes for modifiers to work. Is it a
bug or am I doing something wrong? Here is a simple script:

require'iuplua'

local placeholder = iup.label{title = "Press Key"}
local dlg = iup.dialog{title = "a dialog", iup.vbox{placeholder},
size="QUARTERxQUARTER"}

function dlg:k_any(c)
   if c == iup.K_LSHIFT then placeholder.title = "You pressed
\"LShift\"" end --doesn't work
   if iup.isShiftXkey(c) then
        if c == iup.K_LSHIFT then placeholder.title = "You pressed
\"LShift\"" --doesn't work
        else placeholder.title = "You pressed \"Shift\"" --works
        end
    end
    iup.Refresh(dlg)
end

dlg:popup(iup.CENTER,iup.CENTER)

if (iup.MainLoopLevel()==0) then
    iup.MainLoop()
    dlg:destroy()
    iup.Close()
end


_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to