distribution/packages/hardware/quirks/devices/Anbernic RG351V/075-dpad-volbright
2024-03-09 12:47:03 +00:00

44 lines
866 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
. /etc/profile
DPAD_EVENTS=$(get_setting key.dpad.events)
if [ -z "${DPAD_EVENTS}" ]
then
set_setting key.dpad.events 1
fi
KEY_FUNC_A=$(get_setting key.function.a)
if [ -z "${KEY_FUNC_A}" ]
then
set_setting key.function.a BTN_WEST
fi
KEY_FUNC_B=$(get_setting key.function.b)
if [ -z "${KEY_FUNC_B}" ]
then
set_setting key.function.b BTN_TR
fi
KEY_HOT_A=$(get_setting key.hotkey.a)
if [ -z "${KEY_HOT_A}" ]
then
set_setting key.hotkey.a BTN_WEST
fi
KEY_HOT_B=$(get_setting key.hotkey.b)
if [ -z "${KEY_HOT_B}" ]
then
set_setting key.hotkey.b BTN_TR
fi
KEY_HOT_C=$(get_setting key.hotkey.c)
if [ -z "${KEY_HOT_C}" ]
then
set_setting key.hotkey.c BTN_TL
fi
if [ "$(systemctl is-active input)" = "active" ]
then
systemctl restart input
fi