Author Topic: Capturing "tabulation" input  (Read 4552 times)

indiefreaks

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Capturing "tabulation" input
« on: January 03, 2013, 12:58:51 PM »
Hi,

I've been looking around and couldn't find a way to achieve this up to the point where I had to ask the question directly.

Could anyone tell me how I can detect if the "tab" key was pressed on a UI component? I'd like to toggle the next control in the a form when hit.

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Capturing "tabulation" input
« Reply #1 on: January 03, 2013, 06:11:39 PM »
UIButtonKeys script handles it, along with all the arrow keys and joystick input logic (and Shift+Tab to go back).

indiefreaks

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Re: Capturing "tabulation" input
« Reply #2 on: January 03, 2013, 09:23:47 PM »
I actually noticed that later on while browsing the classes for other objectives.

Just a small remark: naming your classes UIButtonXXX got me confused and I believe it does with other devs too as you'd expect them to work only with Buttons.

Thanks anyway for this great Library. I've used several on many projects for many platforms and it's really easy to setup. (still, I had liked a bit of namespace refactoring for Unity 4 but I know your reasons ;)).