Moved order of method declaration and added getKeyCount method
Changed setting of keylist_mode and added getKeyCount