Custom keys configuration
Previous  Top  Next

 
   If you did not found suitable standart keys configuration, Wizard allows to embed custom keys configuration. Please select "Custom keys configuration..." while building midlet, and provide valid file.  
 
   File with custom keys configuration is a simple text file, created with Notepad. It has the following format:  
 


KEY_MENUUP: -13,-20,56;1  
KEY_UP: -13,-59,-20,56  
KEY_DOWN: -14,48,-21;6  
KEY_MENUDOWN: -14,48,-21;6  
KEY_SELECT: -11,-62,-26,-4  
KEY_MENUSELECT: -11;8,5  
KEY_CANCEL: -1,-12,-61  
KEY_MENUCANCEL: -1,-12,-61;2  
KEY_SLIDESHOW1: 49  
KEY_SLIDESHOW2: 50  
KEY_SLIDESHOW3: 51  
KEY_SEARCH: 52  
KEY_GOTO: 54  
KEY_STATISTICS: 53,-17  
KEY_DELAYPAGE: 55  
KEY_SPECIALACTION: 35  
KEY_ROTATE: 42  
KEY_DONTROTATE: 53,-11,-26,-4,-1,-12,-13,-14  
FLIPSIDEKEYS: YES  


   Each line has the following format:  
 
   [action][:][space][code1][,][code2]...[codeN][;][gameAction1][,][gameAction2]...[gameActionN]  
 
   Each phone key has two different codes - code gameActon.  
 
   Key code [code] - is unique for every key. Values can differ for different phone models.  
 
   Meaning code [gameAction] - specifies key meaning. It is used by J2ME games to recognize "Up", "Down" ,"Left", "Right" and "Fire" keys. Multiple keys can have the same gameAction.  
 
   Keys codes can be found with simple midlet:  
     
   file://C:\Program Files\ReadManiac\KeyCodesMidlet\keycodes.jad  
 
   Actions are listed in the table.  
 
Table. Actions list.  
Action
Description
KEY_MENUUP
Previous menu item
KEY_UP
Previous page
KEY_MENUDOWN
Next menu item
KEY_DOWN
Next page
KEY_MENUSELECT
Select menu item
KEY_SELECT
Bring down menu (reading mode)
KEY_MENUCANCEL
Return to previous menu
KEY_CANCEL
Bring down bookmarks menu (reading mode)
KEY_SLIDESHOW1
Turn on slideshow mode, speed 1
KEY_SLIDESHOW2
Turn on slideshow mode, speed 2
KEY_SLIDESHOW3
Turn on slideshow mode, speed 3
KEY_GOTO
Bring down "Goto page..." dialog
KEY_STATISTICS
Show information screen
KEY_DELAYPAGE
Delay current page on the screen for additional three seconds (slideshow mode)
KEY_SPECIALACTION
Delete selected file (File menu)
KEY_SEARCH
Bring down "Search..." dialog (hold to new search)
KEY_ROTATE
Rotate screen
KEY_DONTROTATE
Midlet rotates KEY_UP, KEY_SELECT, KEY_DOWN, KEY_CANCEL keys when screen is rotated. Ususally it is desired that only joystick get rotated. Specify here codes of keys, which should no be affected, for example, soft keys codes.
FLIPSIDEKEYS: YES
Specify this option, if right joystick key is used as "SELECT" (this is for Siemens scheme, opposed to Nokia and others, where "select" as a left joystick key).
 
 
 
   Examples of keys configuratons can be found here:  
 
   file://C:\Program Files\ReadManiac\Samples\SampleKeyConfigs\     
 
 
   See also: Keys configuration selection (Building ReadManiac FULL), Keys configuration selection (Building ReadManiac LITE or TINY)  
 



 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Rambler's Top100