Context: connecting to kelp (XFCE, display :1) via RealVNC Viewer on macOS (EPAM_HXQLYJV0X2). By default RealVNC captures all key combinations including Cmd+Tab and Alt+Tab, sending them to the remote session.
RealVNC Preferences → Expert tab → set SendSpecialKeys = false.
Effect: Alt+Tab, Cmd+Tab etc. are now handled by macOS. Use Cmd+Tab to switch between Mac apps. The VNC session no longer receives these combos.
Side effect: Alt+Tab no longer cycles windows inside the kelp XFCE session. Need an alternative window-switching key that RealVNC will pass through.
On Mac keyboard: Option+, produces ≤ (U+2264) and Option+. produces ≥ (U+2265). These combos pass through RealVNC to the X11 session.
Goal: make these cycle XFCE windows forward/backward, replacing Alt+Tab / Alt+Shift+Tab.
From xev output on display :1:
• Option+, → keycode 184, keysym lessthanequal, state 0x80 (Mod5)
• Option+. → keycode 197, keysym greaterthanequal, state 0x80 (Mod5)
• Mod5 = ISO_Level3_Shift = keycode 92. It is pressed first (state 0x0), then the key arrives with state 0x80.
xdotool key alt+Tab (with DISPLAY=:1) works correctly from the terminal to cycle windows — confirmed manually.
Installed packages: xbindkeys, xdotool (both present on kelp).
DISPLAY=:1 xfconf-query -c xfce4-keyboard-shortcuts -p '/xfwm4/custom/<Mod5>lessthanequal' -s 'cycle_windows_key' --create -t string
DISPLAY=:1 xfconf-query -c xfce4-keyboard-shortcuts -p '/xfwm4/custom/<Mod5>greaterthanequal' -s 'cycle_reverse_windows_key' --create -t string
DISPLAY=:1 xfwm4 --replace &
Result: keys were grabbed (characters no longer appeared in applications) but window cycling did not trigger. Root cause unclear — possibly xfwm4 opened its tabwin popup which immediately grabbed the keyboard, or the shortcut format is not quite right for a level-3 keysym.
These entries were removed afterwards:
DISPLAY=:1 xfconf-query -c xfce4-keyboard-shortcuts -p '/xfwm4/custom/<Mod5>lessthanequal' --reset
DISPLAY=:1 xfconf-query -c xfce4-keyboard-shortcuts -p '/xfwm4/custom/<Mod5>greaterthanequal' --reset
# ~/.xbindkeysrc
"DISPLAY=:1 xdotool key --clearmodifiers alt+Tab"
Mod5+lessthanequal
"DISPLAY=:1 xdotool key --clearmodifiers alt+shift+Tab"
Mod5+greaterthanequal
Result: xbindkeys did not grab the keys — characters still appeared. Tried several keysym name variants and numeric keycode formats; none grabbed successfully. Note: xbindkeys --key captures the ISO_Level3_Shift modifier keydown rather than the composed key, making it unreliable for detecting these combos.
This config remains in ~/.xbindkeysrc but xbindkeys is not running at session end.
• xfwm4 shortcuts: standard Alt+Tab / Alt+Shift+Tab only — working normally
• xbindkeys: installed but not running; ~/.xbindkeysrc has the Mod5+lessthanequal config from attempt 2
• xdotool: installed, confirmed working for xdotool key alt+Tab
• RealVNC SendSpecialKeys = false — this is the desired permanent state; use Cmd+Tab on Mac to switch Mac apps
1. Revisit xfwm4 shortcut approach — add a debug command (e.g. write to a file) to confirm whether the action fires at all, independent of xdotool.
2. Try sxhkd (Simple X HotKey Daemon) — uses a different key grab mechanism than xbindkeys and may handle level-3 keysyms better.
3. Use xcape to remap at keysym level before xbindkeys/xfwm4 sees the key.
4. Investigate whether xfwm4 tabwin opens briefly but closes immediately (test by adding cycle_raise = true or checking if focus briefly changes).
5. Try remapping the physical keycode 184/197 via xmodmap to a simpler keysym that xbindkeys can grab reliably, then bind that.