Jump to content




Alternate key detection



  • You cannot reply to this topic
3 replies to this topic

#1 cmdpwnd

  • Members
  • 128 posts
  • LocationHere

Posted 19 March 2016 - 05:42 PM

local key = os.pullEvent('key')
keys.getName(key)

should allow detection for alternate keys somehow(idk how seeing a pullEvent only pulls well, one event), so that you can detect an explicit '?' char or '!' etc...

Edited by jacky500, 19 March 2016 - 05:43 PM.


#2 apemanzilla

  • Members
  • 1,421 posts

Posted 19 March 2016 - 06:14 PM

View Postjacky500, on 19 March 2016 - 05:42 PM, said:

local key = os.pullEvent('key')
keys.getName(key)

should allow detection for alternate keys somehow(idk how seeing a pullEvent only pulls well, one event), so that you can detect an explicit '?' char or '!' etc...
Try the char event. It is only sent when there is an explicit character typed - for example 'g', 'G', '_', ' ', ')', etc

local _, c = os.pullEvent("char")
print(c)


#3 cmdpwnd

  • Members
  • 128 posts
  • LocationHere

Posted 19 March 2016 - 07:58 PM

Thanks :)

Edited by jacky500, 19 March 2016 - 08:16 PM.


#4 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 19 March 2016 - 09:49 PM

Moved to Ask a Pro.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users