-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Is your feature request related to a problem? Please describe.
Copying/pasting/defaulting a value is not quickly possible
Describe the solution you'd like
In Blender you can just hover a value and press ctrl+c/ctrl+v/backspace
Proof of Concept
console.clear();
hoveredInput = null; // PCUI element
lastCopy = 0.0;
inputs = [...document.getElementsByTagName("input")];
inputs.forEach(input => {
input.onmouseleave = function(event) {
hoveredInput = null;
}
input.onmouseenter = function(event) {
hoveredInput = event.target?.ui;
}
});
document.onkeydown = function (event) {
if (hoveredInput) {
if (event.key == 'Backspace') {
hoveredInput.value = 0; // Math.random();
event.preventDefault();
} else if (event.ctrlKey && event.key == 'c') {
lastCopy = hoveredInput.value;
event.preventDefault();
//console.log("copy value", lastCopy);
} else if (event.ctrlKey && event.key == 'v') {
hoveredInput.value = lastCopy;
//console.log("paste value", lastCopy);
event.preventDefault();
}
}
//console.log(event);
}Code is just a PoC, it would require proper integration into at least the NumericInput class and/or wherever it makes sense.
Metadata
Metadata
Assignees
Labels
No labels
