Add ability to set scratchpad modes from GUI instead of mouse clicks
(cherry picked from commit 04c13ee4b85b7ec9a9f3c6b214cf5208041b5788)