Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Application under recording freeze if JTextField get input russian characters #12

Open
GoogleCodeExporter opened this issue May 4, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

I don't no about other national characters.

Original issue reported on code.google.com by a.peche...@gmail.com on 23 Aug 2012 at 10:45

@GoogleCodeExporter
Copy link
Author

Tested environments: WT 3.7; eclipse 3.7.2, 3.8, 4.2 with same result.

Original comment by a.peche...@gmail.com on 23 Aug 2012 at 10:49

@GoogleCodeExporter
Copy link
Author

Application under recording is swing.

Original comment by a.peche...@gmail.com on 23 Aug 2012 at 10:52

@GoogleCodeExporter
Copy link
Author

... and OS is Linux 2.6.32 :)

Original comment by a.peche...@gmail.com on 23 Aug 2012 at 10:55

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Creating language key map file not a solution.

Solution is change method createKeyDownEvent of 
com.windowtester.recorder.event.UISemanticEventFactory :

    /**
     * Construct a SemanticKeyDownEvent
     * @return a semantic event
     */
    public static SemanticKeyDownEvent createKeyDownEvent(Component comp, char keychar,int mods) {

    EventInfo info = extractInfo(comp,0,0,1);
    SemanticKeyDownEvent keyDown = new SemanticKeyDownEvent(info);

        keyDown.setKey(keychar);
        KeyStroke ks = KeyStrokeMap.getKeyStroke(keychar);
        int code;
        if(ks==null)
            code=String.valueOf(keychar).codePointAt(0);
        else
            code=ks.getKeyCode();
    keyDown.setKeyCode(code);
    return keyDown;
}

I think it will work for all languages like russian (with full keyboard 
character replacment)

Original comment by a.peche...@gmail.com on 24 Aug 2012 at 6:35

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

No branches or pull requests

1 participant