Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The registration button is invalid in full-screen mode #43

Open
JoyfulAndSpeedyMan opened this issue Oct 23, 2021 · 10 comments
Open

The registration button is invalid in full-screen mode #43

JoyfulAndSpeedyMan opened this issue Oct 23, 2021 · 10 comments
Labels

Comments

@JoyfulAndSpeedyMan
Copy link

Is there a solution to the failure of registration buttons in full screen mode, such as in LOL

@melloware
Copy link
Owner

Can you elaborate what registration button?

@JoyfulAndSpeedyMan
Copy link
Author

OS: Windwows11
JDK: 16
code:

import com.melloware.jintellitype.HotkeyListener;
import com.melloware.jintellitype.JIntellitype;

public class Main {
    private static final int HOME = 96;

    public static void main(String[] args){
        JIntellitype instance = JIntellitype.getInstance();
        String k = "home";
        instance.registerHotKey(HOME,k);
        instance.addHotKeyListener(new HotkeyListener() {
            int i = 1;
            @Override
            public void onHotKey(int identifier) {
                if(identifier == HOME) {
                    System.out.printf("Press Home %d times\n", i++);
                }
            }
        });

    }
}

It works fine until lol is in full screen, but it doesn't work when lol is in full screen. I tried LOL without borders, but it didn't work.
Since I just started using it, I'm not sure if there is a problem with my code writing

@melloware
Copy link
Owner

oh maybe in Full Screen Windows 11 is intercepting the HOME key before it gets to JIntellitype? I have noticed Windows 10 and 11 are a lot more aggressive with their key intercepting.

@melloware melloware added the bug label Oct 23, 2021
@melloware melloware self-assigned this Oct 23, 2021
@JoyfulAndSpeedyMan
Copy link
Author

oh maybe in Full Screen Windows 11 is intercepting the HOME key before it gets to JIntellitype? I have noticed Windows 10 and 11 are a lot more aggressive with their key intercepting.
I've tried running Java programs as an administrator, but nothing

@melloware
Copy link
Owner

Administrator won't help. The HOME key might be special for Full Screen Mode and Microsoft owns the keys before they get to JIntellitype. Have you tried another key like S or A to see if it works in Full Screen? Just trying to figure out if the HOME key is special or FullScreen blocks ALL hotkeys from getting to Jintellitype.

@melloware
Copy link
Owner

cc @RocketMaDev in case you have any thoughts?

@JoyfulAndSpeedyMan
Copy link
Author

Administrator won't help. The HOME key might be special for Full Screen Mode and Microsoft owns the keys before they get to JIntellitype. Have you tried another key like S or A to see if it works in Full Screen? Just trying to figure out if the HOME key is special or FullScreen blocks ALL hotkeys from getting to Jintellitype.

I just tried the following buttons, but the problem is the same as before, it doesn't work in full screen mode

import com.melloware.jintellitype.HotkeyListener;
import com.melloware.jintellitype.JIntellitype;

import java.util.HashMap;
import java.util.Map;

public class Main {
    private static final int N = 90;
    private static final int CTRL_N = 91;
    private static final int CTRL_ALT_N = 92;
    private static final int K = 93;
    private static final int CTRL_K = 94;
    private static final int CTRL_ALT_K = 95;
    private static final int L = 96;
    private static final int CTRL_L = 97;
    private static final int CTRL_ALT_L = 98;
    private static final int HOME = 99;

    private static Map<Integer,String> map = new HashMap<>(16);
    static {
        map.put(N,"N");
        map.put(CTRL_N,"CTRL+N");
        map.put(CTRL_ALT_N,"CTRL+ALT+N");
        map.put(K,"K");
        map.put(CTRL_K,"CTRL+K");
        map.put(CTRL_ALT_K,"CTRL+ALT+K");
        map.put(L,"L");
        map.put(CTRL_L,"CTRL+L");
        map.put(CTRL_ALT_L,"CTRL+ALT+L");
        map.put(HOME,"HOME");
    }

    public static void main(String[] args){
        JIntellitype instance = JIntellitype.getInstance();
        map.forEach(instance::registerHotKey);
        instance.addHotKeyListener(new HotkeyListener() {
            int i = 1;
            @Override
            public void onHotKey(int identifier) {
                System.out.printf("Press %s %d times\n",map.get(identifier), i++);
            }
        });

    }
}

@melloware
Copy link
Owner

Then my guess is Microsoft is blocking it then.

@RocketMaDev
Copy link
Collaborator

According to the fact that the library functions through a visible, I think it happens because an app in full screen mode will cover it.
Please try if it works in other apps.

@melloware melloware removed their assignment Aug 14, 2022
@Xiaobaishushu25
Copy link

Is there a solution to the failure of registration buttons in full screen mode, such as in LOL

Hello, does it only fail when you are in full screen?I find that when I open the LOL client and put it at the front of the desktop, the shortcut doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants