Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM keyboard layout selector #340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Myrtille.Web/Default.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@
<!-- device keyboard. on devices without a physical keyboard, forces the device virtual keyboard to pop up, then allow to send text (a text target must be focused) -->
<input type="button" runat="server" id="keyboard" value="Text" onclick="openPopup('virtualKeyboardPopup', 'VirtualKeyboard.aspx', false);" title="send some text into the remote session" disabled="disabled"/>

<!-- change the keyboard mapping according to the currently used input keyboard of the VM -->
<input type="button" runat="server" id="vmKeyboardLayout" value="VM Keys (en-us)" onclick="openPopup('vmKeyboardLayoutPopup', 'VmKeyboardLayout.aspx', false);" title="VM Keyboard Layout" disabled="disabled"/>

<!-- on-screen keyboard. on devices without a physical keyboard, display an on-screen keyboard, then allow to send characters (a text target must be focused) -->
<input type="button" runat="server" id="osk" value="Keyboard" onclick="openPopup('onScreenKeyboardPopup', 'onScreenKeyboard.aspx', false);" title="on-screen keyboard" disabled="disabled"/>

Expand Down Expand Up @@ -449,6 +452,7 @@
disableControl('<%=scale.ClientID%>');
disableControl('<%=reconnect.ClientID%>');
disableControl('<%=keyboard.ClientID%>');
disableControl('<%=vmKeyboardLayout.ClientID%>');
disableControl('<%=osk.ClientID%>');
disableControl('<%=clipboard.ClientID%>');
disableControl('<%=files.ClientID%>');
Expand Down Expand Up @@ -515,7 +519,7 @@
target.setAttribute('data-y', y);
}

</script>
</script>

</body>

Expand Down
3 changes: 2 additions & 1 deletion Myrtille.Web/Default.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ private void UpdateControls()
scale.Disabled = !Session.SessionID.Equals(RemoteSession.OwnerSessionID) || RemoteSession.HostType == HostType.SSH;
reconnect.Value = RemoteSession.BrowserResize == BrowserResize.Reconnect ? "Reconnect ON" : "Reconnect OFF";
reconnect.Disabled = !Session.SessionID.Equals(RemoteSession.OwnerSessionID) || RemoteSession.HostType == HostType.SSH;
keyboard.Disabled = !controlEnabled || (!string.IsNullOrEmpty(RemoteSession.VMGuid) && !RemoteSession.VMEnhancedMode);
keyboard.Disabled = !controlEnabled || RemoteSession.HostType == HostType.SSH;
vmKeyboardLayout.Disabled = !controlEnabled || RemoteSession.HostType == HostType.SSH;
osk.Disabled = !controlEnabled || RemoteSession.HostType == HostType.SSH;
clipboard.Disabled = !controlEnabled || RemoteSession.HostType == HostType.SSH || !RemoteSession.AllowRemoteClipboard || (!string.IsNullOrEmpty(RemoteSession.VMGuid) && !RemoteSession.VMEnhancedMode);
files.Disabled = !Session.SessionID.Equals(RemoteSession.OwnerSessionID) || RemoteSession.HostType == HostType.SSH || !RemoteSession.AllowFileTransfer || (RemoteSession.ServerAddress.ToLower() != "localhost" && RemoteSession.ServerAddress != "127.0.0.1" && RemoteSession.ServerAddress != "[::1]" && RemoteSession.ServerAddress != Request.Url.Host && string.IsNullOrEmpty(RemoteSession.UserDomain)) || !string.IsNullOrEmpty(RemoteSession.VMGuid);
Expand Down
Loading