Italy
Joined: Nov 18, 2018
Post Count: 8
Status:
Offline
customize function keys in windows to make keyboard shortcuts
Hi, I have been looking to set up function keys in Windows to speed up some commands I use more frequently. For example Modify Walls has CTRL-SHIFT-E Keyboard shortcut, but I would prefer to put on F2, while I would like to put on F3 modify rooms and on F4 modify furniture. Is there a way to make such setting? Thank you very much for your attention and keep up with this great work. This tool is really outstanding. Ciao Giuseppe
Austria
Joined: Jan 27, 2025
Post Count: 1
Status:
Offline
Re: customize function keys in windows to make keyboard shortcuts
If someone else comes across this: I solved it by writing a small bash script.
Requirements: Git for Windows, to be executed by "Git Bash". With default install location of Sweet Home 3D, has to be run in a shell that has been opened with admin permissions.
Modification: Adjust the variables at the beginning of the file. Should be self-explanatory.
INSTALL_DIR="C:/Program Files (x86)/Sweet Home 3D" JAR_FILE="${INSTALL_DIR}/lib/SweetHome3D.jar" PACKAGE_FILE="com/eteks/sweethome3d/swing/package.properties" KEY_OVERRIDES=( E HomePane.MODIFY_ROOM E HomePane.MODIFY_FURNITURE E HomePane.MODIFY_WALL E HomePane.MODIFY_DIMENSION_LINE E HomePane.MODIFY "control J" HomePane.JOIN_WALLS ESCAPE HomePane.SELECT L HomePane.CREATE_DIMENSIONS J HomePane.CREATE_POLYLINES T HomePane.CREATE_LABELS W HomePane.CREATE_WALLS R HomePane.CREATE_ROOMS )
# back up the original file as a starting point if ! [[ -e "${JAR_FILE}.bak" ]]; then cp "${JAR_FILE}" "${JAR_FILE}.bak" fi
# set up a temporary directory TMPDIR=$(mktemp -d) trap "rm -rf '$TMPDIR'" exit cd "$TMPDIR"