Generalization of cycleoption

Fixed cycleoption to be more generic (thus usable for other config
options), rather than having code for the DirectionKeyMap option within
its functions.