Macro not worked correctly!?

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" />

but macro maked from this:


make this:


Why? Where is problem? Any idea?

maybe I must highlight problem:

macro return:


instead of



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"?>
  <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" />

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:


Please sign in to leave a comment.