Special Characters Help
Name: | Special Characters |
Version: | 1.5 |
Last update: | 2019-10-17 13:28:42 |
Introduction
This always-on package creates an Edit ↣ Special Characters menu for inserting international letters
(diacritics) and other non-ascii symbols into the active window.
This menu is useful for those who don't use these characters in their
documents on a daily basis, and can't remember the default OS keyboard
acrobatics necessary to insert them.
All the Special Characters submenus are dynamic: press the
Shift (⇧
) key while a submenu is open to obtain the
uppercase form of the characters.
All of the characters found in the
Edit ↣ Special Characters submenus can be assigned a keyboard shortcut
by selecting the command Alpha ↣ Global Setup ↣ Keyboard Shortcuts ↣ Menu Shortcuts.
The menu item Show Characters Panel gives access to the OS X palette
of characters and symbols.
A Special Characters contextual menu module is also available.
Selecting an item in the contextual menu will replace any selected text
beneath the current cursor click position.
Click here to display the Contextual Menu Preferences panel.
Custom characters
The User Characters submenu is designed to display custom characters.
Use the User Special Characters global preference to specify a list
of characters or symbols that will appear in this submenu. Any dash in this list
is interpreted as a menu separator.
Adding special characters submenus
It is easy to add new submenus to the Special Characters menu. You
just have to:
- declare a new entry in the specialChars::menuItems array. The key
is the submenu's name and the value is a list of characters.
- force a rebuild of the Special Characters menu by invoking the
[specialChars::buildMenu].
The following example creates two new submenus called Armenian and Chess:
set specialChars::menuItems(Armenian) [list ա բ գ դ ե զ է ը թ ժ ի լ խ ծ կ հ ձ ղ ճ մ յ ն շ ո չ պ ջ ռ ս վ տ ր ց ւ փ ք օ ֆ]
set specialChars::menuItems(Chess) [list ♔ ♕ ♖ ♗ ♘ ♙ - ♚ ♛ ♜ ♝ ♞ ♟]
specialChars::buildMenu
These instructions should be copied to the prefs.tcl
file so that Alpha can find them during startup.
Important: in the list of characters, you only have to
declare the lowercase form of the letters. The Special Characters
package automatically detects if there is an uppercase form and then
creates a dynamic item. The uppercase form is obtained by pressing the Shift (⇧
) key while a submenu is open.
Again a dash in the list of characters is interpreted as a menu
separator. In the previous example, a dash character was introduced to
separate the white and the black chess symbols.
Known problems
Please report any problem or bug you encounter to
Alpha's Bug Tracker.
License and Disclaimer
Copyright (c) 2001-2019, Craig Barton Upright and Contributors.
Contributors: Bernard Desgraupes.
All rights reserved.
The specialCharacters package is free software and distributed under
the terms of the new BSD license:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of Craig Barton Upright nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CRAIG BARTON UPRIGHT OR THE CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.