mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Merge pull request #2285 from JeodC/quirks-thor-touch
Resolve AYN Thor touchscreens reporting as keyboards
This commit is contained in:
@@ -11,20 +11,11 @@ if echo "${UI_SERVICE}" | grep -q "sway"; then
|
||||
if [[ "${DEVICE_HAS_DUAL_SCREEN}" == "true" ]]; then
|
||||
TSKEY=$(get_setting "rocknix.touchscreen-keyboard.enabled")
|
||||
if [[ "${TSKEY}" == "1" ]]; then
|
||||
swaymsg 'output DSI-1 power on, seat seat1 fallback no'
|
||||
swaymsg 'output DSI-1 power on'
|
||||
(
|
||||
sleep 2
|
||||
swaymsg 'seat seat1 fallback yes'
|
||||
) &
|
||||
fi
|
||||
fi
|
||||
|
||||
# The following conditionals deal with focus revocation quirks on specific devices
|
||||
|
||||
# Force all inputs into seat1 to bypass the Thor's 0:0 input ID collisions
|
||||
if [[ "${QUIRK_DEVICE}" == "AYN Thor" ]]; then
|
||||
swaymsg 'seat seat1 attach "*"'
|
||||
swaymsg 'seat * keyboard_grouping none'
|
||||
fi
|
||||
|
||||
# Put touchscreen into seat0 for Anbernic RG DS
|
||||
if [[ "${QUIRK_DEVICE}" == "Anbernic RG DS" ]]; then
|
||||
swaymsg seat seat0 attach "1046:911:Goodix_Capacitive_TouchScreen"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# AYN Thor dual-screen ft5x06 touch panels
|
||||
# Touchscreens expose BTN_TOUCH (EV_KEY) which inflates wlroots seat capabilities.
|
||||
# Explicitly mark as touchscreen-only to prevent seat capability 4 (Keyboard) hijacking.
|
||||
|
||||
evdev:name:*ft5x06*:*
|
||||
ID_INPUT_KEYBOARD=0
|
||||
ID_INPUT_TOUCHSCREEN=1
|
||||
@@ -125,15 +125,16 @@ if [ "${DEVICE_HAS_DUAL_SCREEN}" = "true" ]; then
|
||||
second_con=$([[ "${connected_cons[0]}" == "$con" ]] && echo "${connected_cons[1]}" || echo "${connected_cons[0]}")
|
||||
echo 'for_window [title=".*(Secondary|\[w2\]|Sub|Bottom|Screen 2|GamePad).*"] move window to output '"${second_con}" >> $SWAY_HOME/config
|
||||
echo 'for_window [title="RetroArch\s(melonDS|DeSmuME|VecX|MAME|FinalBurn|FB Alpha).*"] exec /usr/bin/vertical-check' >> $SWAY_HOME/config
|
||||
# Required for the touch keyboard to both accept inputs on bottom screen and sent those events to the top screen
|
||||
echo "exec_always swaymsg '[app_id=\"emulationstation\"]' seat seat0 attach \"0:0:wlr_virtual_keyboard_v1\"" >> $SWAY_HOME/config
|
||||
echo "exec_always swaymsg '[app_id=\"emulationstation\"]' seat seat1 attach \"0:0:wlr_virtual_keyboard_v1\"" >> $SWAY_HOME/config
|
||||
fi
|
||||
|
||||
#disable switch focus to secondary screen
|
||||
# AYN Thor touchscreen setup
|
||||
if [ "${QUIRK_DEVICE}" = "AYN Thor" ]; then
|
||||
echo 'for_window [app_id="emulationstation"] reload' >> $SWAY_HOME/config
|
||||
echo 'for_window [title=".*(Secondary|\[w2\]|Sub|Bottom|Screen 2|GamePad).*"] seat seat0 attach "*"' >> $SWAY_HOME/config
|
||||
echo "exec_always swaymsg '[app_id=\"emulationstation\"]' focus output ${con}" >> $SWAY_HOME/config
|
||||
echo "exec_always swaymsg '[app_id=\"emulationstation\"]' seat seat1 attach \"0:0:generic_ft5x06_(8d)\"" >> $SWAY_HOME/config
|
||||
echo "exec_always swaymsg '[app_id=\"emulationstation\"]' seat seat1 fallback yes" >> $SWAY_HOME/config
|
||||
fi
|
||||
|
||||
# Anbernic RG DS touchscreen setup
|
||||
|
||||
Reference in New Issue
Block a user