Macro not worked correctly!?

Hello.
I have defined this macro:

    <macro name="Lang">
      <action id="EditorLineStartWithSelection" />
      <typing text-keycode="0:1">&quot;</typing>
      <action id="EditorDuplicate" />
      <action id="EditorLeft" />
      <typing text-keycode="46:1">:</typing>
      <action id="EditorDown" />
      <action id="EditorLineEnd" />
    </macro>


but macro maked from this:

test_word

make this:

'test_word'°'test_word'

Why? Where is problem? Any idea?
2 comments


maybe I must highlight problem:

macro return:

'test_word'°'test_word'

instead of

"test_word":"test_word"

0

Most likely it is affected by keyboard layout + maybe system locale. Which one do you have?

Here is what I do have when using English (United Kingdom) Qwerty layout (Windows 7 x64), System locale (for non-unicode programms) = Russian.

This is content of the macros.xml (only 1 macro defined):

<?xml version="1.0" encoding="UTF-8"?>
<application>
  <component name="ActionMacroManager">
    <macro name="Lang">
      <typing text-keycode="50:1">&quot;</typing>
      <action id="EditorDuplicate" />
      <action id="EditorLeft" />
      <typing text-keycode="59:1">:</typing>
      <action id="EditorLineEnd" />
    </macro>
  </component>
</application>

The idea is -- you select the text, run macro and it converts into final result (same target as yours)
Some text to become "Some text":"Some text"

The problem is, that this is what I get in the end (does not matter which text I do select:

@
:@

When you press Shift+2 on US English layout you will get @ character, but on UK English layout you will have " character.

I have tried your macross but got exactly the same result as using mine -- definitely keyboard layout influence.


Taking everything together I belive it is PhpStorm issue and it needs to be reported as a bug to the Issue Tracker: http://youtrack.jetbrains.net/issues/WI#newissue=yes

0

Please sign in to leave a comment.