You can define a keyboard macro to automate frequent keystroke sequences. They are defined in the same manner as in the Borland IDE:
All macros are lost when you exit IDA. If you want to have a static macro which is not lost when you quit IDA, then write it down into IDATUI.CFG file. The format of a macro definition is explained here.
NOTE: keyboard macros are available only in the text version of IDA.