Multiple events firing consecutively?

Feature Requests, Comments, Bugs, and Suggestions on the JIntellitype Java API.

Multiple events firing consecutively?

Postby x42bn6 » Mon Aug 24, 2015 10:13 am

I suspect since this is just a JNI bridge, it's not a JIntellitype issue per se, but... I created an IntellitypeListener and registered it. Then, when I hit any of the media buttons on my keyboard (back/forward etc.) once, the listener seems to receive not one but 17 (yes, seventeen) events. This happens even if I hold down the key for a long time then release it - 17 events. Does anyone have any idea why this is happening?

Code I'm using:
Code: Select all
    @Override
    public void onIntellitype(int aCommand) {
        switch (aCommand) {
            case JIntellitype.APPCOMMAND_MEDIA_PLAY_PAUSE:
                LOGGER.info("Play/Pause message received [{}]", Integer.toString(aCommand)); // Logged 17 times when I hit play/pause
                break;
            default:
                LOGGER.info("Undefined INTELLITYPE message caught [{}]", Integer.toString(aCommand));
                break;
        }
    }
x42bn6
 
Posts: 1
Joined: Mon Aug 24, 2015 9:46 am

Re: Multiple events firing consecutively?

Postby Melloware » Mon Aug 24, 2015 12:53 pm

WOW! OK that is really strange. I have never seen that behavior and its quite peculiar that it's 17 events!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11020
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA


Return to JIntellitype

Who is online

Users browsing this forum: No registered users and 1 guest

cron