To capture the use of the ctrl key whilst using the scrollwheel I would use the following javascript code. See the event keywords in the code sample below:
Code:
backplate.onMouseWheel = function (event) {
var size = Number(preferences.scalePref.value),
maxLength = Number(preferences.scalePref.maxLength),
minLength = Number(preferences.scalePref.minLength),
step = 10;
if (event.ctrlKey) {
if (event.scrollDelta > 0) {
size += step;
if (size > maxLength) {
size = maxLength;
}
} else if (event.scrollDelta < 0) {
size -= step;
if (size < minLength) {
size = minLength;
}
}
preferences.scalePref.value = String(size);
resize();
}
};
What is the equivalent method to obtain the CTRL keypress within Xwidget?