mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-30 00:23:21 +00:00 
			
		
		
		
	Show/hide keyboard with three-finger tap.
This commit is contained in:
		| @@ -20,10 +20,8 @@ | ||||
| // UI Definition | ||||
| var GuacamoleUI = { | ||||
|  | ||||
|     /* Detection Constants */ | ||||
|     /* Constants */ | ||||
|      | ||||
|     "LONG_PRESS_DETECT_TIMEOUT"     : 800, /* milliseconds */ | ||||
|     "LONG_PRESS_MOVEMENT_THRESHOLD" : 10,  /* pixels */ | ||||
|     "KEYBOARD_AUTO_RESIZE_INTERVAL" : 30,  /* milliseconds */ | ||||
|  | ||||
|     /* UI Components */ | ||||
| @@ -185,6 +183,15 @@ GuacamoleUI.toggleKeyboard = function() { | ||||
|         GuacamoleUI.display.style.opacity = "0.1"; | ||||
|     }; | ||||
|  | ||||
|     // Detect three-finger tap | ||||
|     GuacamoleUI.display.addEventListener('touchstart', function(e) { | ||||
|          | ||||
|         // If three touches, toggle keyboard | ||||
|         if (e.touches.length == 3) | ||||
|             GuacamoleUI.toggleKeyboard(); | ||||
|          | ||||
|     }, true); | ||||
|  | ||||
|     function positionCentered(element) { | ||||
|         element.style.left = | ||||
|             ((GuacamoleUI.viewport.offsetWidth - element.offsetWidth) / 2 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user