Jump to content




key event - modifiers? ctrl-alt-shift


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

#1 robhol

  • Members
  • 182 posts

Posted 17 February 2013 - 09:17 AM

It would be great if the key event had a simple overview of modifier keys, or a way to poll them.
It wouldn't require more than 3 bools (or a 3-bit number) being sent with the keys, and has been available for a very long time, even on "old school" platforms. Basically, it'd let you easily know if the user hit Esc or Ctrl-Esc or Alt-Shift-Esc, which we can't do currently.

Any ideas on this? There's already stuff like Gopher's "ctrlkeys", but it's a hack and it shows. It does its best, but it seems like something that could be implemented directly into the mod and save everyone a lot of hassle. :)

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 17 February 2013 - 10:29 AM

This is one of our more frequent requests. It's fairly similar to the keyUp/keyDown entry in the do-not-suggest list. I imagine we'll get one or the other or both eventually.

#3 robhol

  • Members
  • 182 posts

Posted 17 February 2013 - 07:46 PM

I didn't see it there, and it most definitely isn't the same. It's three extra bits in an event that exists already, vs. two entirely new events that would be triggered very often.

#4 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 17 February 2013 - 07:48 PM

View Postrobhol, on 17 February 2013 - 07:46 PM, said:

I didn't see it there, and it most definitely isn't the same. It's three extra bits in an event that exists already, vs. two entirely new events that would be triggered very often.

Cool story bro. Its entirely up to the developers. You have plenty of keys, just use F1-12.

#5 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 18 February 2013 - 05:15 AM

or just make a function to change the deley between events when you hold down a key, and the time it takes to do that
and then possibly a delta parameter (similer to love2d)

#6 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 18 February 2013 - 07:02 AM

Not possible. To PixelToast.

#7 AfterLifeLochie

    Wiki Oracle

  • Moderators
  • 480 posts
  • LocationAfterLifeLochie's "Dungeon", Australia

Posted 18 February 2013 - 08:32 AM

As it stands, some clever people (or person?) have already written key modifier tracking code, if I recall correctly - it is around somewhere on the forums.

#8 GopherAtl

  • Members
  • 888 posts

Posted 18 February 2013 - 09:55 AM

if you mean the ctrlkeys api, the person is me, and it works quite well given certain constraints, one of which is it it only works with terminal keys that type symbols - letters, numbers, and symbols. So, ctrl-A, ctrl-3, ctrl-",", sure. Ctrl-shift-p, yes (with disclaimer). Just ctrl-shift, or shift-tab, no. See the thread for more details.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users