kbd/kbdsettings
Stanislav Brabec 8004b168a1 - Update to version 2.7.1:
* setfont: Fixed regression in argument parsing.
  * dumpkeys: Fixed dumpkeys on pc and non-pc architectures.
  * libkeymap: Add API to get/set keymap keywords.
    Export functions to convert the value to kernel code.
    Fix double kbdfile open.
    Dump action codes for keycode 0.
  * libkfont: Fix buffer allocation for doubled font.
    Check console mode.
  * keymaps:
    Add hcesar layout, for portuguese speaking countries.
    Update Colemak-DH keymaps with upstream changes.
    sv-latin1.map: make Ctrl+AltGr+9 act as Ctrl+].
  * fonts:
    Remove non-free Agafari fonts. (bnc#95915,
    remove repack_kbd.sh)
  * other:
    Update man pages.
    Remove deprecated startup scripts.
    (Refresh kbd-2.0.2-fix-bashisms.patch.)
    Remove outdated docs.
    (Drop kbd-1.15.2-docu-X11R6-xorg.patch.)
    Update translations.
- Drop upstreamed patches: kbd-1.15.2-sv-latin1-keycode10.patch,
  kbd-2.0.2-doshell-reference.patch.
- Refresh kbd-1.15.5-loadkeys-search-path.patch.
- Releases are signed, add kbd.keyring and the signature.
- Build documentation with doxygen.

  kbdsettings, boo#1179897, jsc#PED-7814).

OBS-URL: https://build.opensuse.org/package/show/Base:System/kbd?expand=0&rev=182
2025-01-08 20:20:44 +00:00

52 lines
1.2 KiB
Bash

#! /bin/sh
. /etc/sysconfig/keyboard
[ $KBD_DELAY ] && /usr/bin/kbdrate -s -d $KBD_DELAY
[ $KBD_RATE ] && /usr/bin/kbdrate -s -r $KBD_RATE
for i in NUM SCR CAPS; do
conf=$(eval echo KBD_${i}LOCK)
eval confval=\"\$$conf\"
[ -z "$confval" ] && continue
param=$(echo $i | tr A-Z a-z | sed 's/scr/scroll/')
for tty in ${KBD_TTY:-tty1 tty2 tty3 tty4 tty5 tty6}; do
case "$confval" in
yes)
if [ $param = "num" ]; then
touch /run/numlock-on
fi
/usr/bin/setleds -D +$param < /dev/$tty
;;
no)
if [ $param = "num" ]; then
rm -f /run/numlock-on
fi
/usr/bin/setleds -D -$param < /dev/$tty
;;
bios)
if [ -x /usr/libexec/kbd/numlockbios ]; then
bios=$(/usr/libexec/kbd/numlockbios 2>/dev/null)
else
bios=$(/usr/lib/kbd/numlockbios 2>/dev/null)
fi
if [ $param = "num" ]; then
if [ "$bios" = "on" ]; then
touch /run/numlock-on
/usr/bin/setleds -D +$param < /dev/$tty
elif [ "$bios" = "off" -o "$bios" = "unknown" ]; then
rm -f /run/numlock-on
/usr/bin/setleds -D -$param < /dev/$tty
fi
else
echo "Value $confval invalid for $conf"
fi
;;
*)
echo "error: unknown value $confval in $conf"
;;
esac
done
done