[as3]how to make custom controls?

basically i want to make custom controls for my game, but there are a few problems

  1. Which should i use? key code? or char code?
  2. How do i get or reject special keys? like ctrl, alt, shift, arrows etc?