ymacs
ymacs copied to clipboard
System clipboard integration
It should be possible to handle system clipboard by capturing C-c
keydown event and creating almost hidden (ie. 1px*1px) text component and doing select() on it.
I was using keyboard shortcuts library with following code to achieve something similar:
shortcut.add("Ctrl+C", function() {
var k=document.getElementById("clipboard");
// populate k with text
k.select();
}, { propagate: true });
Pasting can be handled in the same way. I have tested this approach on Chrome, Firefox 3.6 and IE8.
yeah, that works fine. i did the same thing and can't live without it: http://groups.google.com/group/ymacs/browse_thread/thread/43e397caebcbe355
btw, how do you use the keyboard shortcuts library with ymacs? does it get the keystroke first and then you pass it on to ymacs? i'd like to intercept certain keys before ymacs if possible.
I didn't use it with ymacs. For ymacs you should probably hack DynarchLib. Unfortunately author does not provide current sources to it but I'm certain he would if someone asked.