Quick and clean units using [esc][shortcut][esc]

Does someone have a list of “[ecs][xx..][ecs]” shortcuts?

I prefer to make unit inputs like this (for example the unit “Farads”):

c = 1F 

…by typing [esc][qf][esc]

Instead of this “confusing” expresion:

c = Quantity[1, "Farads"]

But i cannot find a list of all the “shortcuts” to the different units.

Otherwise i’m open to alternatives

I do not think you can type units like that. Why do you think you can? I tried [esc][qf][esc] and nothing happened.

Using the ESC key produces a named character, not a unit. You can see a full list of named characters and their keyboard shortcuts in the documentation under guide/ListingOfNamedCharacters.

The easiest way to write out quantities is to use natural language input. I often use “Ctrl + =”.

Internally, all Quantities are written that way as “Quantity[number, unit]”. This is the simplest possible representation of a Quantity and the most basic.

Nice link, @Sean Clarke, thanks ! There is also nice palette for units developed specifically for easy input:

Palette for Inputting Typeset Units and Package with Input Aliases

You can also discover named characters by starting typing\[:

Thanks for the answer.
I do not agree that the “esc”-solution cannot make units. When I mouse over the F in the above example it says farads. And when i calculate with different units, the output unit is correct.

For writing units you just need do start the expression with “q” for quantity i think. e.g. [esc]qkv[ecs] for kV (kilovolts).

Actually that Unit palette - brilliant by the way - was the one that made me discover the “esc” solution because it shows up when you mouse over the different units. But doing a lot of electrical engineering I do miss some units.

I sometimes hijack the InputForm for MessageName as a hacky shortcut for entering units:

MakeExpression[ RowBox[ { eStr_String, "::", units_String } ], StandardForm ] :=
  Replace[ ToExpression[ eStr, StandardForm, HoldComplete ],
           HoldComplete[ expr_ ] :> HoldComplete[ Quantity[ expr, units ] ]
  ];

I wouldn’t recommend this for anything other than a throwaway session where you just want to quickly run some numbers, and definitely not for code that you intend to share with others. Overriding default system behavior can make things messy if you aren’t careful.

Oh. I see now. The shortcuts you see are part of that package. They aren’t part of a regular Mathematica installation. Without knowing that, I didn’t understand your question. Without that package, I’m pretty sure you can’t create quantities with the [esc] key.

It makes sence. I’ll try asking the guy that created the palette… Thanks again!