Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 32111 | Differences between
and this patch

Collapse All | Expand All

(-)etc/rc.conf (+6 lines)
Lines 17-22 Link Here
17
EXTENDED_KEYMAPS=
17
EXTENDED_KEYMAPS=
18
#EXTENDED_KEYMAPS="backspace keypad euro"
18
#EXTENDED_KEYMAPS="backspace keypad euro"
19
19
20
# UNICODE specifies whether you want to have UNICODE support in the console.
21
# If you set it to yes, please make sure to set a UNICODE aware CONSOLEFONT 
22
# and KEYMAP
23
24
UNICODE="no"
25
20
# CONSOLEFONT specifies the default font that you'd like Linux to use on the
26
# CONSOLEFONT specifies the default font that you'd like Linux to use on the
21
# console.  You can find a good selection of fonts in /usr/share/consolefonts;
27
# console.  You can find a good selection of fonts in /usr/share/consolefonts;
22
# you shouldn't specify the trailing ".psf.gz", just the font name below.
28
# you shouldn't specify the trailing ".psf.gz", just the font name below.
(-)init.d/consolefont (-18 / +8 lines)
Lines 13-18 Link Here
13
	local param=
13
	local param=
14
	local sf_param=
14
	local sf_param=
15
	local retval=1
15
	local retval=1
16
	local ttydev=
17
	[ -d /dev/vc ] \
18
		&& ttydev=/dev/vc/ \
19
		|| ttydev=/dev/tty
16
	
20
	
17
	if [ -n "${CONSOLEFONT}" ]
21
	if [ -n "${CONSOLEFONT}" ]
18
	then
22
	then
Lines 40-57 Link Here
40
				
44
				
41
				for x in $(seq 1 "${RC_TTY_NUMBER}")
45
				for x in $(seq 1 "${RC_TTY_NUMBER}")
42
				do
46
				do
43
					# Using DEVFS ?
44
					if [ -e /dev/.devfsd ] || \
45
					   [ -e /dev/.udev -a -d /dev/vc ]
46
					then
47
						/bin/setfont ${CONSOLEFONT} ${param} \
48
							${sf_param}/dev/vc/${x} >/dev/null
49
						retval=$?
50
					else
51
						/bin/setfont ${CONSOLEFONT} ${param} \
47
						/bin/setfont ${CONSOLEFONT} ${param} \
52
							${sf_param}/dev/tty${x} >/dev/null
48
						${sf_param}/${ttydev}${x} >/dev/null
53
						retval=$?
49
						retval=$?
54
					fi
55
				done
50
				done
56
			else
51
			else
57
				/bin/setfont ${CONSOLEFONT} ${param} >/dev/null
52
				/bin/setfont ${CONSOLEFONT} ${param} >/dev/null
Lines 65-80 Link Here
65
60
66
		if [ "${retval}" -eq 0 ]
61
		if [ "${retval}" -eq 0 ]
67
		then
62
		then
63
			local unicmd="\033(K"
64
			[ "${UNICODE}" == "yes" ] && unicmd="\033%K"
68
			for x in $(seq 1 "${RC_TTY_NUMBER}")
65
			for x in $(seq 1 "${RC_TTY_NUMBER}")
69
			do
66
			do
70
				# Using DEVFS ?
67
				echo "${unicmd}" > ${ttydev}${x}
71
				if [ -e /dev/.devfsd ] || \
72
				   [ -e /dev/.udev -a -d /dev/vc ]
73
				then
74
					echo -ne "\033(K" >/dev/vc/${x}
75
				else
76
					echo -ne "\033(K" >/dev/tty${x}
77
				fi
78
			done
68
			done
79
		fi
69
		fi
80
		
70
		
(-)init.d/keymaps (-11 / +16 lines)
Lines 26-46 Link Here
26
		echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
26
		echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
27
	fi
27
	fi
28
28
29
	ebegin "Loading key mappings"
30
31
	# Enable unicode ...
32
	set -- ${KEYMAP}
33
	if [ "$1" = "-u" ]
34
	then
35
		/usr/bin/kbd_mode -u
36
		KEYMAP="${KEYMAP/-u}"
37
	fi
38
39
	# New kbd support ...
29
	# New kbd support ...
30
	ebegin "Loading key mappings"
40
	if [ -x /bin/loadkeys ]
31
	if [ -x /bin/loadkeys ]
41
	then
32
	then
42
		[ "${SET_WINDOWKEYS}" = "yes" ] && WINDOWKEYS_KEYMAP="windowkeys"
33
		[ "${SET_WINDOWKEYS}" = "yes" ] && WINDOWKEYS_KEYMAP="windowkeys"
43
		
44
		/bin/loadkeys -q ${WINDOWKEYS_KEYMAP} ${KEYMAP} \
34
		/bin/loadkeys -q ${WINDOWKEYS_KEYMAP} ${KEYMAP} \
45
		                 ${EXTENDED_KEYMAPS} >/dev/null
35
		                 ${EXTENDED_KEYMAPS} >/dev/null
46
	else
36
	else
Lines 48-53 Link Here
48
		return 1
38
		return 1
49
	fi
39
	fi
50
	eend $? "Error loading key mappings"
40
	eend $? "Error loading key mappings"
41
42
	# Enable unicode ...
43
	if [ "${UNICODE}" == "yes" ]
44
	then
45
		local n ttydev=""
46
		[ -d /dev/vc ] \
47
			&& ttydev=/dev/vc/ \
48
			|| ttydev=/dev/tty
49
50
		/usr/bin/kbd_mode -u
51
		dumpkeys | loadkeys --unicode
52
		for n in $(seq 1 "${RC_TTY_NUMBER}")
53
			echo -n -e '\033%G' > ${device}${n}
54
		done
55
	fi
51
}
56
}
52
57
53
58

Return to bug 32111