diff options
Diffstat (limited to 'src/gwacom/wacom-device.c')
-rw-r--r-- | src/gwacom/wacom-device.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gwacom/wacom-device.c b/src/gwacom/wacom-device.c index 29fb9ae..87ac433 100644 --- a/src/gwacom/wacom-device.c +++ b/src/gwacom/wacom-device.c @@ -296,6 +296,21 @@ WacomOptions *wacom_device_get_options(WacomDevice *device) return device->options; } +void wacom_device_set_runtime_option(WacomDevice *device, const char *name, const char *value) +{ + WacomDevicePtr priv = device->priv; + + wcmLog(priv, W_ERROR, "Setting special option %s=%s\n", name, value); + + if (g_str_equal(name, "PanButton")) { + guint btn = atoi(value) - 1; /* array is zero-indexed, config options use 1-indexed ones */ + assert(btn < sizeof(priv->key_actions)); + wcmActionSet(&priv->key_actions[btn], 0, AC_PANSCROLL); + } else { + wcmLog(priv, W_ERROR, ":::::::::::::::: Unsupported runtime option %s ::::::::::::::::\n", name); + } +} + /****************** Driver layer *****************/ int |