Shortcut for typing the square-symbol in BBEdit?

604 views
Skip to first unread message

Vlad Ghitulescu

unread,
Oct 8, 2015, 8:05:51 AM10/8/15
to bbe...@googlegroups.com
Hello!


I cannot remember / figure anymore how to type the square symbol (², SUPERSCRIPT TWO, Unicode: U+00B2, UTF-8: C2 B2) in BBEdit.

I can copy and paste it, but there used to be a shortcut somewhere…


Regards,
Vlad

WordWeaver777

unread,
Oct 8, 2015, 8:26:46 AM10/8/15
to bbe...@googlegroups.com

On Oct 8, 2015, at 10:05 PM, Vlad Ghitulescu <Vl...@Ghitulescu.de> wrote:

I cannot remember / figure anymore how to type the square symbol (², SUPERSCRIPT TWO, Unicode: U+00B2, UTF-8: C2 B2) in BBEdit.

I can copy and paste it, but there used to be a shortcut somewhere…

It would be nice if Rich added a "Mathematical Symbols" table to Edit/Emoji & Symbols.

Just today I was pleasantly surprised to discover that the command key symbol, the shift key symbol, and the option key symbol are located right near the top of those tables.

Thanks Rich! I needed those  today, and I didn't know how to find them quickly in PopChar.

By the way, a very useful page which Ergonis Software just shared with me today in an email exchange:

Patrick Woolsey

unread,
Oct 8, 2015, 9:09:41 AM10/8/15
to bbe...@googlegroups.com
On 10/8/15 at 8:26 AM, wordwe...@gmail.com (WordWeaver777) wrote:

>It would be nice if Rich added a "Mathematical Symbols" table
>to Edit/Emoji & Symbols.
>

The Emoji & Symbols aka Character palette is actually an OS
service, and if you expand it by clicking the small square
control in the upper right corner, the full Character palette
does contain sections for Arrows, Currency Symbols, Math
Symbols, etc. :-)


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
Characters palette-mini.png
Characters palette-expanded.png

WordWeaver777

unread,
Oct 8, 2015, 9:43:11 AM10/8/15
to bbe...@googlegroups.com

> On Oct 8, 2015, at 11:09 PM, Patrick Woolsey <pwoo...@barebones.com> wrote:

> The Emoji & Symbols aka Character palette is actually an OS service, and if you expand it by clicking the small square control in the upper right corner, the full Character palette does contain sections for Arrows, Currency Symbols, Math Symbols, etc. :-)
>
>
> Regards,
>
> Patrick Woolsey

Thanks Patrick. I was not aware of that.

I normally use PopChar when I need to find a special character for a BBEdit document, and only today more thoroughly checked out the character palette in BBEdit.

But now your comment has me curious, and I have a simple question:

How would I normally bring up the built-in character palette outside of BBEdit?

Thanks again.

Patrick Woolsey

unread,
Oct 8, 2015, 11:27:06 AM10/8/15
to bbe...@googlegroups.com
On 10/8/15 at 9:43 AM, wordwe...@gmail.com (WordWeaver777) wrote:

[ re: the Emoji & Symbols aka Character palette ]

>But now your comment has me curious, and I have a simple question:
>
>How would I normally bring up the built-in character palette outside
>of BBEdit?


You can bring up the Character palette within many/most apps via
the same menu command of Edit -> Emoji & Symbols.

Alternatively, you can enable the system-wide Input menu (the
'flag' menu) via the Input Sources pane of the Keyboard system
prefs, and then open the Character palette from that menu at any time.

Christopher Stone

unread,
Oct 8, 2015, 11:36:46 AM10/8/15
to BBEdit-Talk Talk
On Oct 08, 2015, at 10:26, Patrick Woolsey <pwoo...@barebones.com> wrote:
> You can bring up the Character palette within many/most apps via the same menu command of Edit -> Emoji & Symbols.
>
> Alternatively, you can enable the system-wide Input menu (the 'flag' menu) via the Input Sources pane of the Keyboard system prefs, and then open the Character palette from that menu at any time.
______________________________________________________________________

Hey Folks,

The system-wide keyboard shortcut is Cmd-Ctrl-Space.

--
Best Regards,
Chris

Christopher Stone

unread,
Oct 8, 2015, 12:25:12 PM10/8/15
to BBEdit-Talk Talk
On Oct 08, 2015, at 07:05, Vlad Ghitulescu <Vl...@Ghitulescu.de> wrote:
I cannot remember / figure anymore how to type the square symbol (², SUPERSCRIPT TWO, Unicode: U+00B2, UTF-8: C2 B2) in BBEdit.

I can copy and paste it, but there used to be a shortcut somewhere…
______________________________________________________________________

Hey Vlad,

I believe not – at least not on the Mac.  You can directly input Unicode characters via the keyboard in Windows.


On the Mac you're stuck using a utility – either the system character palette – or something like PopChar.

Since you use Typinator you can create easy mnemonics for superscript and subscript numbers like:

;2 for superscript and 2; for subscript.

In fact I believe there are built-in sets for these.

On the other hand it's easy enough to roll-your-own custom character table:

-------------------------------------------------------------------------------------------
# Auth: Christopher Stone <script...@thestoneforge.com>
# dCre: 2015/10/08 11:00
# dMod: 2015/10/08 11:20
# Appl: BBEdit
# Task: Insert Superscript Number(s) into Front Text Document.
# Tags: @Applescript, @Script, @BBEdit, @Insert, @Superscript, @Number, @Front, @Document.
-------------------------------------------------------------------------------------------

set _sep to "-----------------------------"
set superScriptList to {_sep, "SUPERSCRIPT", _sep, "⁰", "¹", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹", "⁺", "⁻", "⁼", "ⁿ", "⁽", "⁾", "₀", _sep, "SUBSCRIPT", _sep, "₁", "₂", "₃", "₄", "₅", "₆", "₇", "₈", "₉", "₊", "₋", "₌", "₍", "₎", "ₔ", "ₐ", "ₑ", "ₒ", "ₓ"}

set myDelimiter to ""

set myChoice to choose from list superScriptList ¬
  with title ¬
  "Superscript Numbers" with prompt ¬
  "Pick 1 or more:" default items {item 1 of superScriptList} ¬
  multiple selections allowed true ¬
  without empty selection allowed

if myChoicefalse then
  set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item delimiters, myDelimiter}
  set myChoice to myChoice as text
  set AppleScript's text item delimiters to oldTIDS
  tell application "BBEdit" to set text of selection of front text window to myChoice
end if

-------------------------------------------------------------------------------------------

--
Best Regards,
Chris

WordWeaver777

unread,
Oct 8, 2015, 12:59:14 PM10/8/15
to bbe...@googlegroups.com
Thank you Patrick and Christopher.

You learn something new everyday.

Who said you can't teach an old horse new tricks??? :)


>
> You can bring up the Character palette within many/most apps via the same menu command of Edit -> Emoji & Symbols.
>
> Alternatively, you can enable the system-wide Input menu (the 'flag' menu) via the Input Sources pane of the Keyboard system prefs, and then open the Character palette from that menu at any time.

Patrick Woolsey

unread,
Oct 8, 2015, 1:54:20 PM10/8/15
to bbe...@googlegroups.com
On 10/8/15 at 12:25 PM, listm...@suddenlink.net (Christopher
Stone) wrote:

>On Oct 08, 2015, at 07:05, Vlad Ghitulescu <Vl...@Ghitulescu.de> wrote:
>>I cannot remember / figure anymore how to type the square
>>symbol (², SUPERSCRIPT TWO, Unicode: U+00B2, UTF-8: C2 B2) in BBEdit.
>>
>>I can copy and paste it, but there used to be a shortcut somewhere…
>
>
>I believe not – at least not on the Mac. You can directly
>input Unicode characters via the keyboard in Windows.
>
><http://superuser.com/questions/47420/insert-unicode-characters-via-the-keyboard>

For reference, you can enter Unicode characters on a Mac by
typing via the "Unicode Hex Input" method (aka "source").

To enable this method, bring up the Keyboard system prefs and
select the Input Sources pane, then make sure the "Show Input
menu in menu bar" option is enabled. Next, click the plus (+)
button below the left-hand list, then select and add the
"Unicode Hex Input" method (you can search for it).

Once you've set things up, you can select this method from the
Input menu[*], and then just press and hold down the Option key
and type the 4-digit hex code of the Unicode character you want
to insert.

[*: You can also use the key shortcuts defined in the Shortcuts
-> Input Sources section of the Keyboard system prefs to switch
input methods ]

PS: Once you've set things up, this is actually much easier to
do than it may sound... :-)

Vlad Ghitulescu

unread,
Oct 8, 2015, 2:04:10 PM10/8/15
to bbe...@googlegroups.com

> Am 08.10.2015 um 17:26 schrieb Patrick Woolsey <pwoo...@barebones.com>:
>
> You can bring up the Character palette within many/most apps via the same menu command of Edit -> Emoji & Symbols.

That’s easy enough - even when not the direct answer to my question (I was hopping to have something like ALT+N for tilda ~ etc.).
Thanks!

Vlad Ghitulescu

unread,
Oct 8, 2015, 2:06:17 PM10/8/15
to bbe...@googlegroups.com

> Am 08.10.2015 um 17:36 schrieb Christopher Stone <listm...@suddenlink.net>:
>
> The system-wide keyboard shortcut is Cmd-Ctrl-Space.

I must have overwritten this somehow, because it doesn’t work for me :-(

And unfortunatelly KeyCue doesn’t give me any cues :-) about who overwrite this!

WordWeaver777

unread,
Oct 8, 2015, 2:06:42 PM10/8/15
to bbe...@googlegroups.com
Patrick, my friend, you are a wellspring of useful information. :)

Vlad Ghitulescu

unread,
Oct 8, 2015, 2:10:13 PM10/8/15
to bbe...@googlegroups.com
Hey Chris!


> Am 08.10.2015 um 18:25 schrieb Christopher Stone <listm...@suddenlink.net>:
>
>
> On the Mac you're stuck using a utility – either the system character palette – or something like PopChar.

That’s what I’m doing usually (the character palette).


> Since you use Typinator you can create easy mnemonics for superscript and subscript numbers like:
>
> ;2 for superscript and 2; for subscript.
>
> In fact I believe there are built-in sets for these.

I’m a TextExpander-user, but I’m sure that’s something similar there too.


> On the other hand it's easy enough to roll-your-own custom character table:
>
> -------------------------------------------------------------------------------------------
> # Auth: Christopher Stone <script...@thestoneforge.com>
> # dCre: 2015/10/08 11:00
> # dMod: 2015/10/08 11:20
> # Appl: BBEdit
> # Task: Insert Superscript Number(s) into Front Text Document.
> # Tags: @Applescript, @Script, @BBEdit, @Insert, @Superscript, @Number, @Front, @Document.
> -------------------------------------------------------------------------------------------
>
> set _sep to "-----------------------------"
> set superScriptList to {_sep, "SUPERSCRIPT", _sep, "⁰", "¹", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹", "⁺", "⁻", "⁼", "ⁿ", "⁽", "⁾", "₀", _sep, "SUBSCRIPT", _sep, "₁", "₂", "₃", "₄", "₅", "₆", "₇", "₈", "₉", "₊", "₋", "₌", "₍", "₎", "ₔ", "ₐ", "ₑ", "ₒ", "ₓ"}
>
> set myDelimiter to ""
>
> set myChoice to choose from list superScriptList ¬
> with title ¬
> "Superscript Numbers" with prompt ¬
> "Pick 1 or more:" default items {item 1 of superScriptList} ¬
> multiple selections allowed true ¬
> without empty selection allowed
>
> if myChoice ≠ false then
> set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item delimiters, myDelimiter}
> set myChoice to myChoice as text
> set AppleScript's text item delimiters to oldTIDS
> tell application "BBEdit" to set text of selection of front text window to myChoice
> end if
>
> —————————————————————————————————————————————

Oh, that’s cool… a little like KBM!
Thanks, Chris!


> --
> Best Regards,
> Chris

Regards,
Vlad




Christopher Stone

unread,
Oct 8, 2015, 2:18:45 PM10/8/15
to BBEdit-Talk Talk
On Oct 08, 2015, at 13:06, Vlad Ghitulescu <Vl...@Ghitulescu.de> wrote:
> I must have overwritten this somehow, because it doesn’t work for me :-(
______________________________________________________________________

Hey Vlad,

It doesn't work in BBEdit, but it does in most apps.

You can set a keyboard shortcut for it in BBEdit as desired.

If it's not working for you elsewhere I don't know why.

--
Best Regards,
Chris

Christopher Stone

unread,
Oct 8, 2015, 2:44:37 PM10/8/15
to BBEdit-Talk Talk
On Oct 08, 2015, at 12:54, Patrick Woolsey <pwoo...@barebones.com> wrote:
For reference, you can enter Unicode characters on a Mac by typing via the "Unicode Hex Input" method (aka "source").
______________________________________________________________________

Hey Patrick,

Ha!  That's good to know.

[*: You can also use the key shortcuts defined in the Shortcuts -> Input Sources section of the Keyboard system prefs to switch input methods ]

PS: Once you've set things up, this is actually much easier to do than it may sound... :-)

Let's make that even easier yet.

Using Shane Stanley's BridgePlus ASObjC Library you can now AppleScript the input method directly (without having to use System Events).  It's very fast.


Install library here (since OSX 10.9):  ~/Library/Script Libraries/

-------------------------------------------------------------------------------------------
# Example Usage
-------------------------------------------------------------------------------------------

use framework "Foundation"
use script "BridgePlus"
load framework

# Examples
# set availableInputSources to (current application's SMSForder's availableInputSourceIDs()) as list
# set allAvailableInputSources to (current application's SMSForder's allAvailableInputSourceIDs()) as list

# Examples
# set langSwitchResult to current application's SMSForder's changeInputSourceTo:"com.apple.keylayout.French"
# set langSwitchResult to current application's SMSForder's changeInputSourceTo:"com.apple.keylayout.Russian"
# set langSwitchResult to current application's SMSForder's changeInputSourceTo:"com.apple.keylayout.US"

# Unicode Hex Input Method
set langSwitchResult to current application's SMSForder's changeInputSourceTo:"com.apple.keylayout.UnicodeHexInput"

-------------------------------------------------------------------------------------------

* The Unicode Hex Input method must be enabled in the system preferences, before it is accessible to script.

--
Best Regards,
Chris

Boris Y.

unread,
Jan 1, 2017, 9:36:50 AM1/1/17
to BBEdit Talk
Hi, I also had this problem and fixed it by creating a shortcut in preferences:

Reply all
Reply to author
Forward
0 new messages