1// Interpretations for arrow keys and a bunch of 2// other common keysyms which make it possible to 3// bind "mouse" keys using xmodmap and activate or 4// deactivate them from the keyboard. 5 6default partial xkb_compatibility "mousekeys" { 7 8 // Keypad actions. 9 10 interpret.repeat= True; 11 12 interpret KP_1 { 13 action = MovePtr(x=-1,y= +1); 14 }; 15 interpret KP_End { 16 action = MovePtr(x=-1,y= +1); 17 }; 18 19 interpret KP_2 { 20 action = MovePtr(x=+0,y= +1); 21 }; 22 interpret KP_Down { 23 action = MovePtr(x=+0,y= +1); 24 }; 25 26 interpret KP_3 { 27 action = MovePtr(x=+1,y=+1); 28 }; 29 interpret KP_Next { 30 action = MovePtr(x=+1,y=+1); 31 }; 32 33 interpret KP_4 { 34 action = MovePtr(x=-1,y=+0); 35 }; 36 interpret KP_Left { 37 action = MovePtr(x=-1,y=+0); 38 }; 39 40 interpret KP_6 { 41 action = MovePtr(x=+1,y=+0); 42 }; 43 interpret KP_Right { 44 action = MovePtr(x=+1,y=+0); 45 }; 46 47 interpret KP_7 { 48 action = MovePtr(x=-1,y=-1); 49 }; 50 interpret KP_Home { 51 action = MovePtr(x=-1,y=-1); 52 }; 53 54 interpret KP_8 { 55 action = MovePtr(x=+0,y=-1); 56 }; 57 interpret KP_Up { 58 action = MovePtr(x=+0,y=-1); 59 }; 60 61 interpret KP_9 { 62 action = MovePtr(x=+1,y=-1); 63 }; 64 interpret KP_Prior { 65 action = MovePtr(x=+1,y=-1); 66 }; 67 68 interpret KP_5 { 69 action = PointerButton(button=default); 70 }; 71 interpret KP_Begin { 72 action = PointerButton(button=default); 73 }; 74 75 interpret KP_F2 { 76 action = SetPtrDflt(affect=defaultButton,button=1); 77 }; 78 interpret KP_Divide { 79 action = SetPtrDflt(affect=defaultButton,button=1); 80 }; 81 82 interpret KP_F3 { 83 action = SetPtrDflt(affect=defaultButton,button=2); 84 }; 85 interpret KP_Multiply { 86 action = SetPtrDflt(affect=defaultButton,button=2); 87 }; 88 89 interpret KP_F4 { 90 action = SetPtrDflt(affect=defaultButton,button=3); 91 }; 92 interpret KP_Subtract { 93 action = SetPtrDflt(affect=defaultButton,button=3); 94 }; 95 96 interpret KP_Separator { 97 action = PointerButton(button=default,count=2); 98 }; 99 interpret KP_Add { 100 action = PointerButton(button=default,count=2); 101 }; 102 103 interpret KP_0 { 104 action = LockPointerButton(button=default,affect=lock); 105 }; 106 interpret KP_Insert { 107 action = LockPointerButton(button=default,affect=lock); 108 }; 109 110 interpret KP_Decimal { 111 action = LockPointerButton(button=default,affect=unlock); 112 }; 113 interpret KP_Delete { 114 action = LockPointerButton(button=default,affect=unlock); 115 }; 116 117 // Additional mappings for Solaris keypad compatibility. 118 119 interpret F25 { // aka KP_Divide 120 action = SetPtrDflt(affect=defaultButton,button=1); 121 }; 122 interpret F26 { // aka KP_Multiply 123 action = SetPtrDflt(affect=defaultButton,button=2); 124 }; 125 interpret F27 { // aka KP_Home 126 action = MovePtr(x=-1,y=-1); 127 }; 128 interpret F29 { // aka KP_Prior 129 action = MovePtr(x=+1,y=-1); 130 }; 131 interpret F31 { // aka KP_Begin 132 action = PointerButton(button=default); 133 }; 134 interpret F33 { // aka KP_End 135 action = MovePtr(x=-1,y= +1); 136 }; 137 interpret F35 { // aka KP_Next 138 action = MovePtr(x=+1,y=+1); 139 }; 140 141 interpret.repeat= False; 142 143 // New keysym actions. 144 145 interpret Pointer_Button_Dflt { 146 action= PointerButton(button=default); 147 }; 148 interpret Pointer_Button1 { 149 action= PointerButton(button=1); 150 }; 151 interpret Pointer_Button2 { 152 action= PointerButton(button=2); 153 }; 154 interpret Pointer_Button3 { 155 action= PointerButton(button=3); 156 }; 157 interpret Pointer_DblClick_Dflt { 158 action= PointerButton(button=default,count=2); 159 }; 160 interpret Pointer_DblClick1 { 161 action= PointerButton(button=1,count=2); 162 }; 163 interpret Pointer_DblClick2 { 164 action= PointerButton(button=2,count=2); 165 }; 166 interpret Pointer_DblClick3 { 167 action= PointerButton(button=3,count=2); 168 }; 169 interpret Pointer_Drag_Dflt { 170 action= LockPointerButton(button=default); 171 }; 172 interpret Pointer_Drag1 { 173 action= LockPointerButton(button=1); 174 }; 175 interpret Pointer_Drag2 { 176 action= LockPointerButton(button=2); 177 }; 178 interpret Pointer_Drag3 { 179 action= LockPointerButton(button=3); 180 }; 181 182 interpret Pointer_EnableKeys { 183 action= LockControls(controls=MouseKeys); 184 }; 185 interpret Pointer_Accelerate { 186 action= LockControls(controls=MouseKeysAccel); 187 }; 188 interpret Pointer_DfltBtnNext { 189 action= SetPtrDflt(affect=defaultButton,button= +1); 190 }; 191 interpret Pointer_DfltBtnPrev { 192 action= SetPtrDflt(affect=defaultButton,button= -1); 193 }; 194 195 // Allow an indicator for MouseKeys. 196 indicator "Mouse Keys" { 197 //!allowExplicit; 198 indicatorDrivesKeyboard; 199 controls= MouseKeys; 200 }; 201}; 202