-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcitrix_alttab
75 lines (67 loc) · 3.2 KB
/
citrix_alttab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env bash
die() { printf %s "${@+$@$'\n'}" 1>&2 ; exit 1 ; }
# Problem: corporate VDI -> RDP session does not allow mapping Alt+Tab key
# combo into Remote (RDP server); instead you get switched out of your RDP
# session into another window on your local PC. This is a massive
# productivity killer (for me).
# https://support.citrix.com/article/CTX232298
#
# For Windows 64-bit OS, navigate to the key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Keyboard\
# Regedit: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Keyboard
# In some cases configuring User based Setting also helps: HKEY_CURRENT_USER\SOFTWARE\Citrix\ICAClient\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Keyboard\
#
# Set the below Value.
#
# Value Name TransparentKeyPassthrough
# Value Type REG_SZ
# Value Remote
hklm_kbd="HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Citrix\\ICA Client\\Engine\\Lockdown Profiles\\All Regions\\Lockdown\\Virtual Channels\\Keyboard\\"
hkcu_kbd="HKEY_CURRENT_USER\\SOFTWARE\\Citrix\\ICAClient\\Engine\\Lockdown Profiles\\All Regions\\Lockdown\\Virtual Channels\\Keyboard\\"
# echo "hklm_kbd=$hklm_kbd"
# echo "hkcu_kbd=$hkcu_kbd"
kbd_valuenm='TransparentKeyPassthrough'
kbd_valuetyp='REG_SZ'
kbd_valuedat='Remote'
set +x
# initial condition (if manual restoration/reversal is necessary): both kbd_valuenm existed, but kbd_valuedat was empty string
reg query "$hkcu_kbd" //v "$kbd_valuenm"
reg query "$hklm_kbd" //v "$kbd_valuenm"
reg add "$hkcu_kbd" //v "$kbd_valuenm" //t "$kbd_valuetyp" //d "$kbd_valuedat"
reg add "$hklm_kbd" //v "$kbd_valuenm" //t "$kbd_valuetyp" //d "$kbd_valuedat"
# Addendum
#
# Citrix Client (a.k.a. "Receiver") hijacks certain key combinations for its
# (users) use. In my case, its hijacking of Ctrl+F3 to perform "open task
# manager" operation was undesirable.
#
# Through some research, I was able to determine from
# https://discussions.citrix.com/topic/382833-configuration-hotkeys-ctrl-f3-does-not-work-with-receiver-4x/
# that the 'perform "open task manager" operation' is called HotKey9. Since
# I have no particular interest in Ctrl+F7, the registry edit recommended in
# the above-linked article:
#
# Windows Registry Editor Version 5.00
#
# [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine\Hot Keys]
# "HotKey9Shift"="Ctrl"
# "HotKey9Char"="F7"
#
# was performed (NB: these values were previously defined to the value ""
# (empty string)), followed by a reboot. Thereafter, I was able to access my
# application's Ctrl+F3-bound functionality using that key combo, and use
# Ctrl+F7 to open Task Manager...
#
# NB: advice to edit %USERPROFILE%\AppData\Roaming\ICAClient\APPSRV.INI
# similarly (giving value "none" to both HotKey9Char and HotKey9Shift
#
# Hotkey9Char=none
# Hotkey9Shift=none
#
# and rebooting) was unsuccessful. This file already contained mappings:
#
# Hotkey12Char=none
# Hotkey12Shift=none
# Hotkey13Char=none
# Hotkey13Shift=none
#
# so assigning value "none" to disable seems to be the correct syntax...