File: mouse.sh

package info (click to toggle)
kickseed 0.64
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 304 kB
  • sloc: sh: 1,709; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (7)
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
#! /bin/sh

mouse_handler () {
	if [ "$#" -eq 0 ]; then
		# autodetection is the default
		return
	fi

	eval set -- "$(getopt -o '' -l device:,emulthree -- "$@")" || { warn_getopt mouse; return; }
	while :; do
		case $1 in
			--device)
				ks_preseed xserver-xorg xserver-xorg/config/inputdevice/mouse/port 'select' "/dev/$2"
				shift 2
				;;
			--emulthree)
				ks_preseed xserver-xorg xserver-xorg/config/inputdevice/mouse/emulate3buttons boolean true
				shift
				;;
			--)	shift; break ;;
			*)	warn_getopt mouse; return ;;
		esac
	done

	# TODO: translate protocol into xserver-xorg's naming scheme
}