Any hidden keyboard shortcut for RightTeeArrow?
If you want to do purely typesetting, you could use the similar symbol for Function
:
EscfnEsc
$\mapsto$
The caveat is that this symbol has a pre-defined meaning, as you can see by entering
TraditionalForm[Function[x,f[x]]]
$x \mapsto f(x)$
If you enter the symbol only in equation cells that aren't meant to be evaluated, it doesn't matter that this pre-defined interpretation exists.
Edit: making shortcuts, the user-friendly way
If you want to be able to quickly make your own shortcuts for symbols or functions, it's also worth keeping in mind that there exists a package for that precise purpose: the Notation
package.
Although I personally also use the method in Mr. Wizard's answer (see e.g. here) to make shortcuts that are easy for others to copy (like on this site), still I would recommend looking into the Notation
package for your own personal use (if you don't want to memorize the manual steps).
Just type this:
Needs["Notation`"]
Escaddia
Esc
AddInputAlias["
$\square$" ->
$\square$]
This is the template that appears after typing the built-in shortcut. Now enter the desired abbreviation rta
(or whatever you like) in the first square, and the character $\mapsto$ (\[RightTeeArrow]
) in the second square.
And you're done.
It is easy enough to add your own InputAliases
. For example evaluating:
CurrentValue[EvaluationNotebook[], {InputAliases, "rta"}] = "↦";
Then entering Escrta
Esc will create a \[RightTeeArrow]
character.
To make the change global and persistent you can add this to the existing list using the Option Inspector with the Global Preferences level selected. (Advanced users can also do it programmatically but this is easier and less prone to error.)
In reply to a comment below there may be other character-related functionality you are unaware of.
Input Forms
Yes indeed you can enter characters using their full name (FullForm
representation), as well as several numeric forms as documented in Input Syntax.
- A list of the full names of characters is available in Listing of Named Characters.
The decimal character code is 8614:
ToCharacterCode["\[RightTeeArrow]"]
{8614}
This in hexadecimal is 21a6
therefore you can also enter the character as \:21a6
.
Operator Behavior
Since ↦
is an Operator it also has established parsing behavior and translation rules to and from the attached Symbol name: RightTeeArrrow
. Examples:
This allows you to easily define rules for the operator (following said parsing behavior):
RightTeeArrow[a_, b_] := a + b
RightTeeArrow[a_, b_, c_] := a*b*c
RightTeeArrow[x__] := {x}
Now:
Extensible Characters
\[RightTeeArrow]
is an extensible character. If you create an overscript using Ctrl+7 as described in the Control Keys section of the Input Syntax tutorial and enter it above an expression it stretches to fit: