1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../powerpc-utils/stone_mod_machid.sh
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
16 # [MAIN] 35 machid Macintosh mouse emulation
19 cat << EOT > /etc/conf/mac_hid
20 mouse_button_emulation="$mouse_button_emulation"
21 mouse_button2_keycode="$mouse_button2_keycode"
22 mouse_button3_keycode="$mouse_button3_keycode"
27 gui_menu machid_enable \
28 "Should the mouse emulation be activated. (Current: $mouse_button_emulation)" \
29 'enable emulation' 'mouse_button_emulation=1' \
30 'disable emulation' 'mouse_button_emulation=0'
35 gui_input
"Set new keycode for button $1" \
36 `eval echo "$"$2` "$2"
42 mouse_button_emulation
=1
43 mouse_button2_keycode
=68 #96
44 mouse_button3_keycode
=87 #125
45 [ -f /etc
/conf
/mac_hid
] && .
/etc
/conf
/mac_hid
47 gui_menu machid
'Macintosh mouse button emulation.
48 Select an item to change the value:\n(Example keys: F10:68, F11: 87, Apple: 125, KP_Return: 96 - others use showkey)' \
49 "Emulation enabled ........ $mouse_button_emulation" 'set_enable' \
50 "Mouse Button 2 keycode ... $mouse_button2_keycode" 'set_button 2 mouse_button2_keycode' \
51 "Mouse Button 3 keycode ... $mouse_button3_keycode" 'set_button 3 mouse_button3_keycode' \
53 'Edit the /etc/conf/mac_hid file' \
54 "gui_edit 'MAC HID Config File' /etc/conf/mac_hid" \
55 'Configure runlevels for mac_hid service' \
56 '$STONE runlevel edit_srv mac_hid' \
57 '(Re-)Start mac_hid init script' \
58 '$STONE runlevel restart mac_hid'