| View previous topic :: View next topic |
| Author |
Message |
mistamaila General User

Joined: 20 Feb 2005 Posts: 16
|
Posted: Wed Sep 21, 2005 7:24 am Post subject: how to bind a key combination/stroke to a special character? |
|
|
| How can i bind a special character to a key combination? |
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Wed Sep 21, 2005 7:27 am Post subject: |
|
|
Record a macro to insert the character, and assign the macro to a keystroke.
To make it work for any font, edit the macro and remove the two lines that refer to the font name that was in effect when you recorded the macro. _________________ Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP |
|
| Back to top |
|
 |
mistamaila General User

Joined: 20 Feb 2005 Posts: 16
|
Posted: Wed Sep 21, 2005 7:35 am Post subject: |
|
|
| i thought it was recording a macro, but where do i record it to? a new module? and how do i assign it to a keystroke? |
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Wed Sep 21, 2005 7:51 am Post subject: Step by step |
|
|
Record the Macro
- Tools, Macros, Record
- Insert, Special Character, Choose character, OK
- Stop Recording
- Enter a name for the macro, let it be in Module1 if that is the default
- Click on "Save"
Edit the Macro
- Tools, Macros, Organize, Openoffice.org Basic
- Select the macro you just recorded, and click on edit
- Look for these two lines: args1(1).Name = "FontName" and args1(1).Value = "Arial" (or whatever), and delete them.
- Close the Macro edit window, your changes will be saved automatically
Assigning the Macro to a Keystroke
- Tools, Customize, Keyboard
- Category, Openoffice.org Macros, User, Standard, Module1
- Function, Your New Macro (select it)
- Shortcut, Click in the shortcut field and type the shortcut you wish to use, or scroll to find it.
- Select the shortcut, e.g. Ctrl+Shift+C and click on Modify
- Your macro name will appear alongside the shortcut
- OK and test your new shortcut.
It is a lot quicker to do than to explain. _________________ Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP
Last edited by Bhikkhu Pesala on Sun Jul 01, 2007 3:35 am; edited 4 times in total |
|
| Back to top |
|
 |
martyd14 Newbie

Joined: 05 Oct 2005 Posts: 2
|
Posted: Wed Oct 05, 2005 10:54 am Post subject: thanks!! |
|
|
 |
|
| Back to top |
|
 |
Carson General User

Joined: 08 Oct 2004 Posts: 24 Location: Vancouver, Canada
|
Posted: Wed Mar 15, 2006 6:55 pm Post subject: |
|
|
This is beautifully written, and it works! I just made my first-ever OO macro, using Bhikkhu Pesala's info above.
One teensy detail: Under "Record the Macro", the 5th step is
Save
which is pretty obvious, but might be good to add in there.
IMHO, this point-form information would be very handy in the OO.org Help files, under Special Characters and AutoText. Those are the places a lot of people will be looking, especially if they have come from M$ Word and want to know how OO can be set to call up a few extra-useful Special Characters by keystroke.
My first one, for example, was the em-dash. Yes, I know how to get an em-dash in OO by other techniques, but now I can use Ctrl M, which is fastest for me and requires no brainwork at the time. (I don't want to divert my very limited brain-RAM away from what I'm writing!)
Thanks again, Bhikkhu Pesala, and, through whatever is the appropriate process, please do consider this be added to that location in Help. It would have saved me a couple of hours last night, AND it would have given me a solution. (Under "Macros" it depends on the user already knowing the solution involves macros! I didn't know that last night!) |
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Wed Mar 15, 2006 9:43 pm Post subject: |
|
|
| Carson wrote: | | Through whatever is the appropriate process, please do consider this be added to that location in Help. |
The appropriate process is to register at Bugs and Issues and file a new issue under Documentation.
However, I suggest it would be more useful to file an issue under Enhancements, ”Allow assignment of text to shortcuts,” as one can do in WordPerfect or Word, and save that rather long-winded recording and editing of macros. Search for issues first, as a similar issue may already have been created.
| Quote: | | I don't want to divert my very limited brain-RAM away from what I'm writing! |
I assigned em-dash to a keystroke too, because I don't like the Autocorrect method—I prefer to have space either side of the dash to allow line-breaks. Unfortunately, I forgot which shortcut I assigned it to.
Edit: I found it. I assigned it to Alter M, using IanNZ's Alt-key Handler macros.
Control m produces an m with a dot below (ṃ) and Control shift M produces an M with a dot below (Ṃ). I would like to assign it to _ but that is not currently possible. _________________ Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP |
|
| Back to top |
|
 |
Arnethius General User

Joined: 19 May 2006 Posts: 7
|
Posted: Fri May 19, 2006 9:36 am Post subject: |
|
|
Hi, i couldn't find this anywhere by searching, so i alpologise if it has come up before, but is there a way to assign a macro to a key combination of Alt + (whatever) ?
I think this would be really useful, i have many of these shortcuts in MS word and would liek to be able to keep them the same if possible
Thanks |
|
| Back to top |
|
 |
Westland Super User


Joined: 03 Feb 2006 Posts: 562
|
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Wed Sep 20, 2006 3:21 am Post subject: |
|
|
Vote for Issue 4579 (currently 23 votes). Dependent on Issue 4756 (Currently 27 votes)
This question comes up fairly regularly. A related question is "How can I enter characters with Alter + Codepoint in Open Office?" You cannot at the moment, unless you use the IanNZ Alt-Key Handler macros.
In Opera, I can type the codepoint, followed by Alter X to replace the code with the relevant Unicode character. For example — 0100 or 100 followed by Alter X will type Ā (U+0100 LATIN CAPITAL LETTER A WITH MACRON), or 266B followed by Alter X will type ♫ (U+266B BEAMED EIGHTH NOTES).
These input methods with codepoints have two huge drawbacks:
1. You have to remember the code
2. They take four or more keystrokes.
Greater flexibility in assigning shortcuts would help many users who regularly type in more than one language. _________________ Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP
Last edited by Bhikkhu Pesala on Mon Jan 29, 2007 9:22 am; edited 2 times in total |
|
| Back to top |
|
 |
Steve Dolesch General User

Joined: 18 Oct 2006 Posts: 20
|
Posted: Sun Oct 22, 2006 4:42 pm Post subject: Re: Step by step |
|
|
Hi, I got the assiigning part. I don't get the latter part shown below... Also, why does the languages change?
[/list]Assigning the Macro to a Keystroke
- Tools, Customize, Keyboard
- Category, User, Standard, Module1
- Function, Your New Macro (select it)
- Shortcut, Click in the shortcut field and type the shortcut you wish to use, or scroll to find it.
- Select the shortcut, e.g. Ctrl+Shift+C and click on Modify
- Your macro name will appear alongside the shortcut
- OK and test your new shortcut.
It is a lot quicker to do than to explain.[/quote] |
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Sun Oct 22, 2006 8:59 pm Post subject: Re: Step by step |
|
|
| Steve Dolesch wrote: | | Hi, I got the assiigning part. I don't get the latter part shown below... |
The Functions and macros are in the bottom left of the customize dialogue. You have to scroll down to find your macros.
| Quote: | | Also, why does the languages change? |
Not sure why the language changes for you. Did that happen when you recorded the macro? _________________ Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP |
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
|
| Back to top |
|
 |
tbeals56 General User

Joined: 12 Nov 2006 Posts: 5
|
Posted: Sun Jan 28, 2007 10:21 am Post subject: Assign a new shortcut combo (not in default list) ? |
|
|
| Quote: | [/list]Assigning the Macro to a Keystroke
* Tools, Customize, Keyboard
* Category, User, Standard, Module1
* Function, Your New Macro (select it)
* Shortcut, Click in the shortcut field and type the shortcut you wish to use, or scroll to find it. |
I have not been able to enter a new key-combination into the shortcut field. I want to use <Ctrl+;> to enter today's date as a string. The trivial macro is written and works. Typing in the shortcut field does not trigger edit-mode for me. Is there a way to add key-cominations to the shortcut panel? |
|
| Back to top |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Sun Jan 28, 2007 11:27 am Post subject: |
|
|
No. What you see is what you get. Entering a shortcut in that field will highlight it if it exists. You cannot add any shortcuts. _________________ Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|