1

How do we block the tab key?

//this handler is not executed on simulator, maybe because it is supported only in Desktop and Web?

on tabKey

end tabKey

What I want is, when a user pressed tab key, it should not add any space. Pressing tab in development does not add add space but when I ran it in iPad simulator 8.2, it adds space when tab is pressed.

JunM
  • 7,040
  • 7
  • 37
  • 58

1 Answers1

0

The rawKeyDown message should do what you want.

on rawKeyDown theKey
  if theKey is not 65509 then
    pass rawKeyDown
  end if
end rawKeyDown
Mark
  • 2,380
  • 11
  • 29
  • 49
  • Does 65509 works only on real ios device? I tried alerting the `theKey` in simulator and press tab key in the keyboard, it is `0`. – JunM Jun 15 '15 at 01:05
  • According to the docs, it works. You can also try the `keyDown` message and check for `tab`. – Mark Jun 15 '15 at 07:41
  • If it doesn't work and you're not using a native field, you may want to report it as a bug. – Mark Jun 17 '15 at 06:46