# Copyright 2013 Eric Messick (FixedImagePhoto.com/Contact) # # Lines in this file starting with # are comments. # # # This file is divided into paragraphs, each specifying the bindings to # be used when the keyboard focus is on a specific window. The # paragraph is introduced with a line starting with [. That line # contains the paragraph name (which is only used for debugging output # to help you in editing this file) followed by ], followed by a regular # expression. When the title bar of the focused window matches the # regular expression (see regex(7)), the bindings in the paragraph will # be in effect. The program tries these regular expressions in order, # and the first match is used. # If there is no regex on the line, like the [Default] line near the # bottom, the paragraph acts as a default. Any window title which does # not match any regex will use the default bindings. Any keys which are # not specified in the paragraph which does match will use the default # bindings for those keys. # While you are working on regular expressions to match your window # names, is is useful to see the window names and paragraph names which # the program finds as you generate ShuttlePRO events. Run the shuttle # program in a terminal window and remove the comment character from the # following line: #DEBUG_REGEX # Within a paragraph, key bindings are introduced with the name of the # key or event being defined. Keys are named K1 through K15. Positions # of the shuttle wheel are named S-7 through S-1 for counter-clockwise # positions, S0 for the rest position in the center, and S1 through S7 # for the clockwise positions. The jog wheel emits two events named JL # and JR, for counter-clockwise and clockwise rotations respectively. # The keys on the Contour Shuttle Pro v2 are arranged like this: # # K1 K2 K3 K4 # K5 K6 K7 K8 K9 # # K14 Jog K15 # # K10 K11 # K12 K13 # After the name of the key being bound, the remainder of the line is # the sequence of X KeySyms which will be generated when that event is # received. Look up the KeySyms in /usr/include/X11/keysymdef.h. In # addition to the KeySym names found there, you can also use XK_Button_1 # for the left mouse button, XK_Button_2 for the middle mouse button, # XK_Button_3 for the right mouse button, XK_Scroll_Up and # XK_Scroll_Down for mouse scroll wheel events. For sequences of one or # more printable characters, you can just enclose them in double quotes. # Each KeySym you specify will be pressed and released before the next # KeySym is pressed. If you wish a key to be held down, you can add a # /D to the end of the KeySym. For example: XK_Shift_L/D, # XK_Control_L/D or XK_Alt_L/D. Such keys will be held down until you # specify they should be released with a /U on the same KeySym name. # They will all be released at the end of the binding anyway, so you # usually won't have to use /U. # Key bindings, whose names start with a K, allow for some extra # options. Since they generate separate events when pressed and # released, you can control that as well. Each non-modifier key is # pressed and released in sequence except for the last which is not # released until the shuttle key is released. If you want to press more # keys during the release sequence, you can put them after the special # word "RELEASE". Modifier keys specified with /D are released at the # end of the press sequence, and re-pressed if there are any keys to be # pressed after RELEASE. If you don't want the modifier keys to be # released (you want to use a ShuttlePRO key as Shift, for example) you # can follow it with a /H instead of /D. # If you want to see exactly how this file is parsed and converted into # KeySym strokes, run the shuttle program in a terminal window and # remove the comment character from the following line: #DEBUG_STROKES # As one of the main reasons to use a ShuttlePRO is video editing, I've # included a sample set of bindings for Cinelerra as an example. [Cinelerra Resources] ^Cinelerra: Resources$ # use [Default], avoiding main Cinelerra rule [Cinelerra Load] ^Cinelerra: Load$ # use [Default], avoiding main Cinelerra rule [Cinelerra] ^Cinelerra: [^[:space:]]*$ K5 XK_KP_0 # Stop K9 XK_KP_3 # Play K12 XK_Home # Beginning K13 XK_End # End K14 "[" # Toggle in K15 "]" # Toggle out S-3 XK_KP_Add # Fast reverse S-2 XK_KP_6 # Play reverse S-1 XK_KP_5 # Slow reverse S0 XK_KP_0 # Stop S1 XK_KP_2 # Slow forward S2 XK_KP_3 # Play forward S3 XK_KP_Enter # Fast forward JL XK_KP_4 # Frame reverse JR XK_KP_1 # Frame forward [Default] K6 XK_Button_1 K7 XK_Button_2 K8 XK_Button_3 JL XK_Scroll_Up JR XK_Scroll_Down