Any way to change the fontsize shortcut in Microsoft OneNote?

3

1

I have been using Microsoft OneNote for months and using it as it should have to be used. When I started to use OneNote, whenever I needed to increase or decrease font-size, I tried to apply the common MS Word shortcut, but it didn't work for me.

After months, it came to my knowledge that it's possible to increase or decrease font-size using Ctrl + Shift + > or Ctrl + Shift + <. But I don't like these shortcuts.

Is there any way to customize the OneNote keyboard shorcuts?

muhammad tayyab

Posted 2015-01-25T13:47:12.133

Reputation: 158

– misha256 – 2015-01-26T05:24:34.160

Mac version doesn't even HAVE shortcuts for font size .... unless I'm missing something? – Dan – 2016-10-07T10:20:04.670

Answers

0

Using AutoHotkey:

#if WinActive("ahk_exe ONENOTE.EXE")
^NumpadAdd::^+.
^NumpadSub::^+,
#if

If you don't want to use + and - keys on a numerical keyboard replace NumpadAdd with = and NumpadSub with - (assuming you have an EN keyboard layout and want to use the keys next to backspace).

The ^ stands for Ctrl, + for Shift and ! would stand for Alt if you want to modify the hotkeys (more info on special modifiers).


Complex explanation

I'm a bit of an AutoHotkey nerd, because I encounter these types of issues often in my own workflow and couldn't help myself not to explain how the language works here. In case anybody wants to delve into the deep waters, here you go:

The < > and + key problem:

For me the < and > keys normally act (without the Shift and Control) as a dot . and comma , and + acts as =, and that is also the proper way to write them into the script. Another possible reason for why a version of the script with these keys wouldn't trigger is because the <, > and + are special modifier symbols. In case normal key names don't work at all, there are also special virtual key IDs {vk##} and scan codes {sc##} which can be used instead and figured out using KeyHistory. There is a bit more complexity and preparation to this last part, example here.

The window detection:

Additionally a better way to approach the window title in WinActive in this case may be to refer to the .exe directly using ahk_exe [app_name_goes_here].exe. Name of the OneNote executable may differ in other editions (I'm using OneNote 2016). You can figure it out using WindowSpy.ahk (which is an app that should be a part of every AutoHotkey installation (you will find it in the AutoHotkey folder)) or by looking for the OneNote executable in the task manager.

Proper use of WinActive in this case:

In order to not disrupt the new hotkey combination (^NumpadAdd + ^NumpadSub) added using the script in other apps it's important to make them context-sensitive using #If, which has to be positioned above these hotkey declarations. If you want to expand the script with non-context-sensitive code underneath, it's important to turn the context-sensitivity off using an empty #If statement.

One-line hotkeys and no need for Send/SendInput:

If the hotkey is simple enough that it fits into one line, it doesn't need to return and doesn't even need to use Send or SendInput. This can however prove tricky if you need to use specially named keys such as NumpadAdd which would in Send be written with {} around them. (example Send {NumpadAdd})

azurry

Posted 2015-01-25T13:47:12.133

Reputation: 306

Thanks for the answer, However, I am happy with shorcut – muhammad tayyab – 2020-01-19T04:03:41.370

1

I tried using AutoHotkey for this, but somehow the Onenote doesn't react to the input I send it, ie.

; commments start from colon
; ^ is control, + is shift
^+::
if WinActive("Onenote")
SendInput ^+<
;MsgBox Stuff1
return

^-::
if WinActive("Onenote")
SendInput ^+>
;MsgBox Stuff2
return

If you uncomment them, the Stuff messageboxes appear, but the keys are not interpeted properly. Perhaps someone can continue from this point..

Koshmaar

Posted 2015-01-25T13:47:12.133

Reputation: 79

-1

Alt-H-FS and then type the font you want

Note: FS means press the key F and then key S

Alok Joshi

Posted 2015-01-25T13:47:12.133

Reputation: 1