- Timestamp:
- 01/21/20 09:49:32 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gio/gesture/ExpediteeKBMGestureTranslator.java
r1458 r1502 1268 1268 } 1269 1269 1270 // CTRL + SHIFT + R is the reparse frame body event 1271 if (kbmTranslator.isKeyDown(Key.SHIFT)) { 1272 return null; 1273 } 1274 1270 1275 // Must be pressing R to justify 1271 1276 if (kbmEvent.getKeyDown() != KBMInputEvent.Key.R) { … … 1275 1280 // Return the gesture 1276 1281 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.JUSTIFY), new JustifyGestureData(true)); 1282 } 1283 }); 1284 1285 // Add the CTRL + SHIFT + R -> REPARSE FRAME BODY gesture recogniser 1286 addTranslator(new InputEventToGestureTranslator(InputType.KBM) 1287 { 1288 @Override 1289 public String details() { return "CTRL + SHIFT + R -> REPARSE FRAME BODY"; } 1290 1291 @Override 1292 public List<Gesture> onInputEvent(InputEvent event) { 1293 // Cast to keyboard/mouse event 1294 KBMInputEvent kbmEvent = (KBMInputEvent) event; 1295 1296 // Check that ctrl is down 1297 if (!kbmTranslator.isKeyDown(Key.CTRL)) { 1298 return null; 1299 } 1300 1301 // CTRL + SHIFT + R is the reparse frame body event 1302 if (!kbmTranslator.isKeyDown(Key.SHIFT)) { 1303 return null; 1304 } 1305 1306 // Must be pressing R to justify 1307 if (kbmEvent.getKeyDown() != KBMInputEvent.Key.R) { 1308 return null; 1309 } 1310 1311 // Return the gesture 1312 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.REPARSE), null); 1277 1313 } 1278 1314 });
Note:
See TracChangeset
for help on using the changeset viewer.