mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 00:45:01 +02:00
Reverted initial commit. Implemented hack to listen for menu click events.
This commit is contained in:
parent
10dc75af5d
commit
1ab2a7e1e3
1 changed files with 24 additions and 1 deletions
|
@ -2130,6 +2130,24 @@
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
cameraManager.keyPressEvent(event);
|
cameraManager.keyPressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hacks to get the menu bar buttons to work
|
||||||
|
// Copy
|
||||||
|
if (event.key === 67 && event.isControl && !event.isShifted) {
|
||||||
|
selectionManager.copySelectedEntities();
|
||||||
|
}
|
||||||
|
// Paste
|
||||||
|
if (event.key === 86 && event.isControl && !event.isShifted) {
|
||||||
|
selectionManager.pasteEntities();
|
||||||
|
}
|
||||||
|
// Cut
|
||||||
|
if (event.key === 88 && event.isControl && !event.isShifted) {
|
||||||
|
selectionManager.cutSelectedEntities();
|
||||||
|
}
|
||||||
|
// Delete
|
||||||
|
if (event.key === 16777223 && !event.isControl && !event.isShifted) {
|
||||||
|
createApp.deleteSelectedEntities();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
var keyReleaseEvent = function (event) {
|
var keyReleaseEvent = function (event) {
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
|
@ -2140,7 +2158,12 @@
|
||||||
Controller.keyPressEvent.connect(keyPressEvent);
|
Controller.keyPressEvent.connect(keyPressEvent);
|
||||||
|
|
||||||
function deleteKey(value) {
|
function deleteKey(value) {
|
||||||
if (value === 1) { // on release
|
if (value === 0) { // on press
|
||||||
|
createApp.deleteSelectedEntities();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function copyKey(value){
|
||||||
|
if (value === 1) { // on press
|
||||||
createApp.deleteSelectedEntities();
|
createApp.deleteSelectedEntities();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue