# Limit keyboard input

**URL:** <https://forum.kirupa.com/t/limit-keyboard-input/187128>\
**Category:** flash\
**Created:** [April 26, 2006, 9:11pm UTC](https://forum.kirupa.com/t/limit-keyboard-input/187128 "2006-04-26T21:11:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ieatcotten](https://avatars.discourse-cdn.com/v4/letter/i/3da27b/32.png) [@ieatcotten](https://forum.kirupa.com/u/ieatcotten)\
**Post date:** [April 26, 2006, 9:11pm UTC](https://forum.kirupa.com/t/limit-keyboard-input/187128/1 "2006-04-26T21:11:17Z")

</div>

I have several input text fields that should take Hex input. I want to limit keyboard input to a-f, A-F, 0-9, left/right arrows, and backspace. I can determine which key was pressed easy enough; I just don’t know how to cancel an unwanted keystroke. This seems like it should be very simple, however, I have not been able to find an answer.
