Using CLI - key mapping configuration file



The configuration file for key mappings is a tab-separated value format. You can edit this file directly, in any text editor. Alternatively, chmfp allows you to generate your own configuration. The first statement must be :




where 0 is the number of the MFP (0 if you only ever use one). Any line before will be ignored, as well as any line following the next [. Numbers must be specified in decimal. Blanks lines and lines starting with '#' are ignored


See <input.h> for all uinput event codes, most common key codes are listed in files provided as sample configuration. These are NOT the USB scan codes. Beware also these are QWERTY-based, AZERTY keyboards will have to adapt (most common switches includes A <> Q, Z <> W and M <> , ). Events include keyboard, mouse or joystick buttons, among others (multimedia keys can also be mapped).


File contains TAB separated values :
CH=<key>    type=<type>    value=<value>    comment=<free text>

<key> is a number from 1 - 102, positive or negative, in any order
    1 to 50 are normal CH keys (green led) - no action if unfilled
    51 to 100 are CH keys with red led mode (default to green if unfilled)
    101 is for green led button press
    102 is for red led button press
        negative value means a different action if modifier key pressed

<type> has a value from 1 to 7, or 11 to 18, 21 to 28 or 31 to 38
    1 is for button press (keyboard, mouse, joystick,...)
    2 is the same but sticky (press once to hold, again to release)
    3 is for horizontal X-axis mouse movement (+ means right)
    4 is for vertical Y-axis mouse movement (+ means down)
    5 is for macros
    6 is for stopping any running macro
    7 means this key is a modifier key (type of local-shift)
    11 to 18 are joystick axes (resp. X, Y, Z, RX, RY, RZ, THR, RUD)
    21 to 28 are for setting to zero (centered) each joystick axis
    31 to 38 are joystick hats: odd for X-axis and even for Y-axis
        Four hats are possible, so hat 1 X-axis = 31, hat 4 Y-axis = 38

<value> is a value depending on the type specified
    if type is 1 or 2, then it is the uinput event code (see below)
        (use 0 for key to do nothing, use to avoid red/shifted defaults)
    if type is 3 or 4, then it is the value of pixels to move mouse
        (positive / negative values apply, default is nb pixels per 5 ms)
    if type is 5, then it is the number of the macro to execute
    if type is 6 or 7, this value is ignored
    if type is 11 to 18, then it is the joystick axes value to move
        (positive / negative values apply, default speed is 10 per ms)
    if type is 21 to 28, this value is ignored
    if type is 31 to 38, positive means right/down, negative left/up

<comment> is an optional free user text, only used in graphical mode