Use SetGlobal "KEY" / "KEYPRESS" to hold "shift" don't work.
iup = require 'iuplua'
iup.dialog{iup.text{
value = 'Press "F1" to send Shift+Right. If success,
the character "P" of word "Press" will be selected.',
k_any = function(self, key)
if key == iup.K_F1 then
--These don't work fine
iup.SetGlobal('KEY', iup.K_sRIGHT)
--iup.SetGlobal('KEY',
iup.XkeyShift(iup.K_RIGHT))
--iup.SetGlobal('KEYPRESS',
iup.K_LSHIFT)
--iup.SetGlobal('KEY', iup.K_RIGHT)
--iup.SetGlobal('KEYRELEASE',
iup.K_LSHIFT)
-- iup.SetGlobal('KEY',
iup.K_cRIGHT)
-- Works fine for 'c' - control
end
end,
}
}:show()
iup.MainLoop()
I use this 'SetGlobal "KEY"' like send to select word in text/scintilla.------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users