Macro Unbind Numpad Shortcuts: Difference between revisions

From FreeCAD Documentation
(update to FC 0.20 (didn't unbind '0' key))
(bump up version; indicate FC version)
Line 7: Line 7:
|Description=When entering numbers, and the number input box is not properly focused, FreeCAD will react to digits by switching standard views. This macro is a quick way to re-bind the shortcuts to Ctrl+number. Doesn't help very much with entering numbers, but at least the view won't spin like crazy.
|Description=When entering numbers, and the number input box is not properly focused, FreeCAD will react to digits by switching standard views. This macro is a quick way to re-bind the shortcuts to Ctrl+number. Doesn't help very much with entering numbers, but at least the view won't spin like crazy.
|Author=DeepSOIC
|Author=DeepSOIC
|Version=1.0
|Version=2.0
|Date=2018-04-22
|Date=2018-04-22
|FCVersion=All
|FCVersion=0.20
|Download=[https://www.freecadweb.org/wiki/images/1/1e/Macro_Unbind_Numpad_Shortcuts.png ToolBar Icon]
|Download=[https://www.freecadweb.org/wiki/images/1/1e/Macro_Unbind_Numpad_Shortcuts.png ToolBar Icon]
}}
}}

Revision as of 20:30, 13 April 2022

Other languages:

Macro Unbind Numpad Shortcuts

Description
When entering numbers, and the number input box is not properly focused, FreeCAD will react to digits by switching standard views. This macro is a quick way to re-bind the shortcuts to Ctrl+number. Doesn't help very much with entering numbers, but at least the view won't spin like crazy.

Macro version: 2.0
Last modified: 2018-04-22
FreeCAD version: 0.20
Download: ToolBar Icon
Author: DeepSOIC
Author
DeepSOIC
Download
ToolBar Icon
Links
Macro Version
2.0
Date last modified
2018-04-22
FreeCAD Version(s)
0.20
Default shortcut
None
See also
None

Description

When entering numbers, and the number input box is not properly focused, FreeCAD will react to digits by switching standard views. This macro is a quick way to re-bind the shortcuts to Ctrl+number. Doesn't help very much with entering numbers, but at least the view won't spin like crazy.

See forum thread How to turn off (disable) Numpad navigation?

How to use:

1. Copy-paste macro code to Py console of FreeCAD.

2. Press enter twice (to make sure everything is executed).

3. Restart FreeCAD for the changes to take effect.

Script

ToolBar Icon

Macro_Unbind_Numpad_Shortcuts.FCMacro

preset = [
    ("Std_ViewIsometric"   , "Ctrl+0"),
    ("Std_ViewFront" , "Ctrl+1"),
    ("Std_ViewTop"   , "Ctrl+2"),
    ("Std_ViewRight" , "Ctrl+3"),
    ("Std_ViewRear"  , "Ctrl+4"),
    ("Std_ViewBottom", "Ctrl+5"),
    ("Std_ViewLeft"  , "Ctrl+6"),
]
for (cmd, shortcut) in preset:
    App.ParamGet("User parameter:BaseApp/Preferences/Shortcut").SetString(cmd, shortcut)