!7 // fixes typing "|" in VNC module VNCFixer > DynPrintLogAndEnabled { S computerID; transient bool shouldSend; visualize { ret centerAndSouth(super.visualize(), withMargin(withLabel("Computer ID:", dm_fieldTextField('computerID)))); } start { dm_requireLinuxWindowList(); 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(); ret unless cic(getString(first((L) call(dm_linuxWindowList(), 'getData)), 'windowTitle), "X desktop (smartbot)"); shouldSend = true; print("Preparing to send | to vnc"); } }); } }