[Solved] How to create custom shortcut keys using macro

Creating a macro - Writing a Script - Using the API

[Solved] How to create custom shortcut keys using macro

Postby 026538 » Tue Dec 18, 2012 3:06 pm

is it possible to create custom shortcut keys in calc ?

in the past, i did it in EXCEL, for example, Alt + E to paste formula to value, Alt + R to create a new workbook, Alt + D for sorting, Alt + A for filter, the code is in PERSONAL.XLS, which will be executed automatically when EXCEL startup,
Last edited by 026538 on Wed Dec 19, 2012 11:00 am, edited 1 time in total.
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
026538
 
Posts: 52
Joined: Wed Dec 12, 2012 5:59 am

Re: how to create custom shortcut keys using macro

Postby FJCC » Tue Dec 18, 2012 3:44 pm

You can connect macros to a key combination using the menu Tools -> Customize and then selecting the Keyboard tab.Near the bottom of the dialog there is a list of categories and macros are near the end of that list. Be sure to check that the function you want does not already exist. For example, you can select the category Application and the function New and assign keys to that to open a new document.
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7160
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

how to create custom shortcut keys using macro

Postby 026538 » Tue Dec 18, 2012 3:51 pm

Thanks,

now i want to have custom shortcut keys for some non-embedded functions,

for example,

in my current daily work, i need to get the unique records of a certain cell range, so i just want to wirte some code to do that, and assign macro to a shortcut keys, seems that using the customizing in menu can not do that,
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
026538
 
Posts: 52
Joined: Wed Dec 12, 2012 5:59 am

Re: how to create custom shortcut keys using macro

Postby FJCC » Tue Dec 18, 2012 5:23 pm

FJCC wrote:You can connect macros to a key combination using the menu Tools -> Customize and then selecting the Keyboard tab.Near the bottom of the dialog there is a list of categories and macros are near the end of that list......


Yes, you can map a macro to a key combination. Select Macros from the category list, navigate to the macro you want, then select a key combination and click Modify.
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7160
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: [Solved] How to create custom shortcut keys using macro

Postby djpython » Sun Jan 27, 2013 3:16 am

"click modify" doesnt work for me
though the macro gets recorded and can play back correctly through the menus...
and though the chosen shortcut appears in the dialog as soon as i click Modify...
when i hit my chosen shortcut ^T when back in the worksheet, only a little "t" gets typed in the selected cell- none of the recorded or programmed actions occur

I am using OO 3.4.1 on a Mac Book Pro under Mountain Lion
Open Office 3.4.1 on MacOS 10.8
User avatar
djpython
 
Posts: 16
Joined: Tue Jan 15, 2013 11:06 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 8 guests