missing const for vid,pid. Expanded/corrected default.cfg
+112 −48 · 2 files changed
-
KD100.c+3 −0 -
default.cfg+109 −48
@@ -193,6 +193,9 @@ void trim_trailing_spaces(char* str); leader_mode_t parse_leader_mode(const char* mode_str); const char* leader_mode_to_string(leader_mode_t mode); +const int vid = 0x256c; +const int pid = 0x006d; + // Get current time in milliseconds long get_time_ms() { struct timeval tv; @@ -1,9 +1,9 @@ // KD100 config file // // Assumptions: -// - (B)utton defines a new button and the following number specifies which button it is. Without the paranthesis, the previous sentence would define a new button -// - (B)uttons do not need to be listed in order but their type and function must be listed on separate lines afterwards -// - (B)utton definitions can be skipped if you don't want all the buttons to work on the keydial +// - (B)utton defines a new button and the following number specifies which button it is. +// - (B)uttons do not need to be listed in order but their type and function must be listed on separate lines afterwards. +// - (B)utton definitions can be skipped if you don't want all the buttons to work on the keydial. // - (B)utton, type, and function definitions can contain numbers, symbols, or letters before hand but must have a number or function after the ':' // - Ex) @#$!123ttype: 1 - is valid // - type: f02r - will default to type 0 @@ -13,8 +13,8 @@ // - The wheel functions must be defined at the end of the config file // - If one wheel side has more functions than the other, it will set the function of the other wheel to NULL and do nothing when turning the wheel that way // - Three wheel functions are provided but there is no limit to the amount you can add -// - Both button and wheel definitions do not need '//' before them and the wheel definition doesn't need the text after it to work -// - '//' is not required to add comments to the file but anything after a function, type, or button will be included in the program +// - Both button and wheel definitions do not read '//' before them and the wheel definition do not need the text after it to work +// - '//' is not required to add comments to the file but anything after a button, type, or function will be included in the program // - All other text is skipped by the program // - (W)heel functions cannot run programs or act as mouse input // @@ -39,90 +39,151 @@ // |-------|---| 15| // | 16 | 17| | // |---------------| +// + +// +// Leader configuration +// Options: +// Leader Button: Specify which key should take role as modifier for the keys. +// Leader Functions: Specify which key press will be used. +// Leader Timeout: Ammount of time that leader remains active in miliseconds. +// Leader Mode: One of the three modes that the leader will act. +// +// One shot: The leader keypress will act one time in the configured time window. +// Example: Press Button 16 (leader) -> Press Button 0 (b) -> Result: shift+b -> Leader resets +// +// Sticky: Leader stays active until timeout +// Example: Press Button 16 (leader) -> Press Button 0 (b) -> Result: shift+b +// Press Button 1 (p) -> Result: shift+p +// Press Button 2 (t) -> Result: shift+t +// Timeout after 1000ms -> Leader resets +// +// Toggle: Leader toggles on/off +// Example: Press Button 16 (leader) -> Leader enabled +// Press Button 0 (b) -> Result: shift+b +// Press Button 1 (p) -> Result: shift+p +// Press Button 16 (leader) -> Leader disabled +// Press Button 0 (b) -> Result: b (normal) +// Default: one_shot +// +leader_button: 16 +leader_function: shift +leader_timeout: 1000 +leader_mode: one_shot -// Button 0 +// +// hid_uclogic compatibility configuration +// enabe_uclogic: [true|false] - OpenTabletDriver requires hid_uclogic to be unloaded from kernel. +// Default: false +// enable_uclogic: false +// + +// Brush Tool Button 0 type: 0 function: b -// Button 1 +// +// Optional: leader_eligible: [true|false] +// Declare button as eligble to be used or not alongside with the leader key +// Default: all buttons (with the exception of Button 18, the wheel toggle button, are eligible. +// +leader_eligible: true +// Color Picker Button 1 type: 0 -function: f -// Button 2 +function: p +leader_eligible: true +// Transform Tool Button 2 type: 0 -function: e -// Button 3 +function: t +leader_eligible: true +// Lasso Select Button 3 type: 0 -function: x -// Button 4 -Button 3 +function: l +leader_eligible: true +// New Layer +Button 4 type: 0 -function: m -// Button 5 +function: Insert +leader_eligible: true +// Duplicate Layer Button 5 type: 0 -function: ctrl+c -// Button 6 +function: ctrl+j +leader_eligible: true +// Merge Down Button 6 type: 0 -function: ctrl+v -// Button 7 +function: ctrl+e +leader_eligible: true +// Eraser Tool Button 7 type: 0 -function: ctrl+shift+a -// Button 8 +function: e +leader_eligible: true +// Clear Selection Button 8 type: 0 -function: ctrl+z -// Button 9 +function: ctrl+d +leader_eligible: true +// Delete Selection Button 9 type: 0 -function: ctrl+shift+z -// Button 10 +function: Delete +leader_eligible: true +// Undo Button 10 type: 0 -function: shift -// Button 11 +function: ctrl+z +leader_eligible: true +// Invert Selection Button 11 type: 0 -function: ctrl -// Button 12 +function: ctrl+shift+i +leader_eligible: true +// Pan (Hand) Button 12 type: 0 -function: ctrl+g -// Button 13 +function: space +leader_eligible: true +// Zoom Button 13 type: 0 -function: ctrl+e -// Button 14 +function: ctrl+space +leader_eligible: true +// Rotate Canvas Button 14 type: 0 -function: Delete -// Button 15 +function: shift+space +leader_eligible: true +// Mirror Canvas (Flip Horizontal) Button 15 type: 0 -function: space -// Button 16 +function: m +leader_eligible: true +// SHIFT Modifier (Hold) Button 16 type: 0 -function: ctrl+s -// Button 17 +function: leader +leader_eligible: true +// Redo Button 17 type: 0 -function: Insert -// Dial Button 18 +function: ctrl+shift+z +leader_eligible: true +// Wheel Toggle Button Button 18 type: 1 function: swap -// Wheel Clockwise +// Clockwise Turn Wheel -function: ctrl+KP_Add function: bracketright -function: NULL -// Wheel Counter-Clockwise\ +function: o +function: shift+bracketright +// Counter-Clockwise Turn Wheel -function: ctrl+minus function: bracketleft -function: NULL +function: i +function: shift+bracketleft