# HG changeset patch # User Carl Byington # Date 1403621893 25200 # Node ID 5bf6d84cc5b83b688503cc1c799389258ec40c3d # Parent 9f1eff475559697a280e2f36a84b0944c59ab9e6 add showurl command diff -r 9f1eff475559 -r 5bf6d84cc5b8 src/com/five_ten_sg/connectbot/monitor/MonitorService.java --- a/src/com/five_ten_sg/connectbot/monitor/MonitorService.java Tue Jun 24 07:41:39 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/monitor/MonitorService.java Tue Jun 24 07:58:13 2014 -0700 @@ -42,6 +42,7 @@ public static final char MONITOR_CMD_GETFIELD = 6; public static final char MONITOR_CMD_SCREENWATCH = 7; public static final char MONITOR_CMD_DEPRESS = 8; + public static final char MONITOR_CMD_SHOWURL = 9; public static final int MONITORPORT = 6000; public static ConcurrentHashMap clients = new ConcurrentHashMap(); @@ -427,4 +428,16 @@ cm.clientWrite(MONITOR_CMD_DEPRESS, arg); } } + + public static void teShowUrl(int connection, char [] url) { + int len = url.length; + CommunicationThread cm = clients.get(connection); + if (cm != null) { + char[] arg2 = new char[2 + len]; + int base = 2; + System.arraycopy(url, 0, arg2, base, len); + cm.clientWrite(MONITOR_CMD_SHOWURL, arg2); + } + } + } diff -r 9f1eff475559 -r 5bf6d84cc5b8 xml/510connectbotmonitor.in --- a/xml/510connectbotmonitor.in Tue Jun 24 07:41:39 2014 -0700 +++ b/xml/510connectbotmonitor.in Tue Jun 24 07:58:13 2014 -0700 @@ -161,14 +161,15 @@ - DEPRESS = 8 (Monitor -> TE). The argument is a single - uint16 value containing a Windows VK key code. See - http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731 - for the values. The following values are implemented - in the emulator - vk_back vk_tab vk_return vk_escape - vk_prior vk_next vk_end vk_home vk_left vk_up vk_right - vk_down vk_insert vk_delete vk_f1 vk_f2 vk_f3 vk_f4 - vk_f5 vk_f6 vk_f7 vk_f8 vk_f9 vk_f10 vk_f11 vk_f12. + DEPRESS = 8 (Monitor -> TE). The argument is a single uint16 + value containing the vk_key value. This command causes the emulator + to simulate a keypress for that key. The codes are defined + here. + + + + SHOWURL = 9 (Monitor -> TE). The single argument is a sequence + of uint16 character codes forming a URL to be displayed.