New question #254203 on Sikuli:
https://answers.launchpad.net/sikuli/+question/254203

I'm trying to write a java program that can listen when a user copies a text 
like this:

String key = "c";
        int modifiers = KeyModifier.CTRL;

        HotkeyListener listener = new HotkeyListener() {
            @Override
            public void hotkeyPressed(HotkeyEvent hotkeyEvent) {
                copyListener.executeCopy();
            }
        };

HotkeyManager.getInstance().addHotkey(key, modifiers, listener);

My problem is that this code overrides the global hotkey so that nothing is 
actually copied to clipboard when I press ctrl + c (when I get result from 
clipboard I only get what I copied before running this program, it works fine 
when I'm not using this hotkeylistener though). Is it possible to let the user 
copy text with ctrl + c and just listen to the event without intercepting it, 
or somehow place the selected text in clipboard?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to