commit
						37b5a08f87
					
				| @ -43,7 +43,7 @@ | ||||
| 
 | ||||
|         <activity | ||||
|             android:name=".MainActivity" | ||||
|             android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||||
|             android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode|navigation" | ||||
|             android:exported="true" | ||||
|             android:hardwareAccelerated="true" | ||||
|             android:launchMode="singleTop" | ||||
|  | ||||
| @ -724,13 +724,17 @@ class FFI { | ||||
| 
 | ||||
|   static void inputKey(String name, {bool? down, bool? press}) { | ||||
|     if (!ffiModel.keyboard()) return; | ||||
|     setByName( | ||||
|         'input_key', | ||||
|         json.encode(modify({ | ||||
|           'name': name, | ||||
|           'down': (down ?? false).toString(), | ||||
|           'press': (press ?? true).toString() | ||||
|         }))); | ||||
|     final Map<String, String> out = Map(); | ||||
|     out['name'] = name; | ||||
|     // default: down = false | ||||
|     if (down == true) { | ||||
|       out['down'] = "true"; | ||||
|     } | ||||
|     // default: press = true | ||||
|     if (press != false) { | ||||
|       out['press'] = "true"; | ||||
|     } | ||||
|     setByName('input_key', json.encode(modify(out))); | ||||
|   } | ||||
| 
 | ||||
|   static void moveMouse(double x, double y) { | ||||
|  | ||||
| @ -343,9 +343,14 @@ class _RemotePageState extends State<RemotePage> { | ||||
|                     onKey: (data, e) { | ||||
|                       final key = e.logicalKey; | ||||
|                       if (e is RawKeyDownEvent) { | ||||
|                         if (e.repeat) { | ||||
|                         if (e.repeat && | ||||
|                             !e.isAltPressed && | ||||
|                             !e.isControlPressed && | ||||
|                             !e.isShiftPressed && | ||||
|                             !e.isMetaPressed) { | ||||
|                           sendRawKey(e, press: true); | ||||
|                         } else { | ||||
|                           sendRawKey(e, down: true); | ||||
|                           if (e.isAltPressed && !FFI.alt) { | ||||
|                             FFI.alt = true; | ||||
|                           } else if (e.isControlPressed && !FFI.ctrl) { | ||||
| @ -355,7 +360,6 @@ class _RemotePageState extends State<RemotePage> { | ||||
|                           } else if (e.isMetaPressed && !FFI.command) { | ||||
|                             FFI.command = true; | ||||
|                           } | ||||
|                           sendRawKey(e, down: true); | ||||
|                         } | ||||
|                       } | ||||
|                       // [!_showEdit] workaround for soft-keyboard's control_key like Backspace / Enter | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user