# Focus 3D view shortcut

**URL:** <https://discourse.slicer.org/t/focus-3d-view-shortcut/26381>\
**Category:** Support\
**Tags:** python\
**Created:** [November 22, 2022, 3:20pm UTC](https://discourse.slicer.org/t/focus-3d-view-shortcut/26381 "2022-11-22T15:20:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atsui\_75](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/atsui_75/32/16046_2.png) [@Atsui\_75](https://discourse.slicer.org/u/Atsui_75)\
**Post date:** [November 22, 2022, 3:20pm UTC](https://discourse.slicer.org/t/focus-3d-view-shortcut/26381/1 "2022-11-22T15:20:19Z")

</div>

Hi:

In version 4.11.20210226 when I used to press “F” while placing the mouse cursor on top of a model in the 3D view, the camera got centered where I pressed the button.

Is there any way to set up a keyboard shortcut (using a python script) with the same functionallity?

Thank you for your attention in advance.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 1, 2022, 6:20am UTC](https://discourse.slicer.org/t/focus-3d-view-shortcut/26381/2 "2022-12-01T06:20:11Z")

</div>

You can right-click on a markup point and choose “Refocus camera on this point”.

---

<div class="post-metadata">

**Author:** ![Atsui\_75](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/atsui_75/32/16046_2.png) [@Atsui\_75](https://discourse.slicer.org/u/Atsui_75)\
**Post date:** [December 9, 2022, 9:30am UTC](https://discourse.slicer.org/t/focus-3d-view-shortcut/26381/3 "2022-12-09T09:30:43Z")

</div>

Thank you for your answer Andras :))

It isn’t as comfortable as a keyboar shortcut but it certainly does what I need so I will use that.
