Git Product home page Git Product logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Fixed in 1.3.7

Original comment by mellowaredev on 17 Aug 2011 at 11:01

  • Changed state: Fixed

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hi,
now in 1.3.7 does not work ALT_MASK | CTRL_MASK - method returns 0, but should 
probably return 3.

I propose this to group xxx_MASK and xxx_DOWN_MASK:
if ((swingKeystrokeModifier & InputEvent.SHIFT_MASK) == InputEvent.SHIFT_MASK
                || (swingKeystrokeModifier & InputEvent.SHIFT_DOWN_MASK) == InputEvent.SHIFT_DOWN_MASK) {
            mask |= JIntellitypeConstants.MOD_SHIFT;
        }
        if ((swingKeystrokeModifier & InputEvent.ALT_MASK) == InputEvent.ALT_MASK
                || (swingKeystrokeModifier & InputEvent.ALT_DOWN_MASK) == InputEvent.ALT_DOWN_MASK) {
            mask |= JIntellitypeConstants.MOD_ALT;
        }
        if ((swingKeystrokeModifier & InputEvent.CTRL_MASK) == InputEvent.CTRL_MASK
                || (swingKeystrokeModifier & InputEvent.CTRL_DOWN_MASK) == InputEvent.CTRL_DOWN_MASK) {
            mask |= JIntellitypeConstants.MOD_CONTROL;
        }

Original comment by [email protected] on 26 Jan 2012 at 9:27

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Have you tested this fix in all scenarios?

Original comment by mellowaredev on 26 Jan 2012 at 9:30

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024

Original comment by mellowaredev on 26 Jan 2012 at 9:31

  • Changed state: Accepted

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Yes, it will handle all combinations of SHIFT, ALT and CTRL keys and treat 
xxxMASK and xxxDOWN_MASK as same single JIntellitypeConstants modifier. I hope 
it was the first intention.

Plus I would consider including InputEvent.META_MASK (equivalent to 
JIntellitypeConstants.MOD_WIN?):

if ((swingKeystrokeModifier & InputEvent.META_MASK) == InputEvent.META_MASK
                || (swingKeystrokeModifier & InputEvent.META_DOWN_MASK) == InputEvent.META_DOWN_MASK) {
            mask |= JIntellitypeConstants.MOD_WIN;
        }

Original comment by [email protected] on 27 Jan 2012 at 7:08

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hi, one more thing. I suppose swingToIntelliType(int swingKeystrokeModifier) 
should not be called from registerHotKey(int identifier, int modifier, int 
keycode) as input modifiers to that method are expected already in jintellitype 
format.

Regards

Original comment by [email protected] on 27 Jan 2012 at 7:23

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Can you look at this version I just checked into the /trunk to make sure it 
looks OK?

http://code.google.com/p/jintellitype/source/browse/trunk/src/main/java/com/mell
oware/jintellitype/JIntellitype.java?spec=svn27&r=27

Original comment by mellowaredev on 27 Jan 2012 at 5:55

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Yes, it's working now.

Original comment by [email protected] on 29 Jan 2012 at 10:13

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Awesome thanks for the patch. I will be a new version and put it on the 
downloads page.

Original comment by mellowaredev on 29 Jan 2012 at 1:30

from jintellitype.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Fixed and 1.3.8 uploaded.

Original comment by mellowaredev on 30 Jan 2012 at 1:02

  • Changed state: Fixed

from jintellitype.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.