Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit f4a3969

Browse files
committed
disable mobile
1 parent 074911c commit f4a3969

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

com.unity.uiwidgets/Runtime/engine/UIWidgetsPanelWrapper.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,12 @@ public void OnPointerLeave() {
344344

345345
public void OnKeyDown(Event e) {
346346
int modifier = 0;
347+
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
347348
modifier |= e.shift ? (1 << (int) FunctionKey.shift) : 0;
348349
modifier |= e.alt ? (1 << (int) FunctionKey.alt) : 0;
349350
modifier |= e.command ? (1 << (int) FunctionKey.command) : 0;
350351
modifier |= e.control ? (1 << (int) FunctionKey.control) : 0;
352+
#endif
351353
UIWidgetsPanel_onKey(ptr: _ptr, keyCode: e.keyCode, e.type == EventType.KeyDown, modifier);
352354
if (e.character != 0 || e.keyCode == KeyCode.Backspace) {
353355
PointerEventConverter.KeyEvent.Enqueue(new Event(other: e));

com.unity.uiwidgets/Runtime/gestures/converter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,12 @@ public static IEnumerable<PointerEvent> expand(IEnumerable<PointerData> data, fl
201201
keyBoardEvent.type = EventType.KeyUp;
202202
}
203203
keyBoardEvent.keyCode = (KeyCode)datum.buttons;
204+
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
204205
keyBoardEvent.shift = (datum.modifier & (1 << (int) FunctionKey.shift)) > 0;
205206
keyBoardEvent.alt = (datum.modifier & (1 << (int) FunctionKey.alt)) > 0;
206207
keyBoardEvent.command = (datum.modifier & (1 << (int) FunctionKey.command)) > 0;
207208
keyBoardEvent.control = (datum.modifier & (1 << (int) FunctionKey.control)) > 0;
208-
209+
#endif
209210
RawKeyboard.instance._handleKeyEvent(keyBoardEvent);
210211
TextInput.OnGUI();
211212
}

0 commit comments

Comments
 (0)