!7 // fixes typing "|" module VNCFixer > DynPrintLogAndEnabled { S computerID; transient bool shouldSend; visualize { ret centerAndSouth(super.visualize(), withMargin(withLabel("Computer ID:", dm_fieldTextField('computerID)))); } start { dm_vmBus_onMessage('keyUp, voidfunc(int keyCode, int modifiers) { if (shouldSend && keyCode == 56) { // Alt+Gr released shouldSend = false; switch to q(); print("Sending | to vnc"); dm_evalOnOtherMachine(computerID, "robot_pressAndRelease_vbar_englishLayout();"); } }); dm_vmBus_onMessage('keyDown_raw, voidfunc(int rawCode, int modifiers) { if (enabled && isComputerID(computerID) && rawCode == 124 && modifiers == 128) { //robot_keyRelease(KeyEvent.VK_ALT_GRAPH); // doesn't work switch to q(); shouldSend = true; print("Preparing to send | to vnc"); } }); } }