Tab Key Not Working

조회 수: 30 (최근 30일)
Tobias
Tobias 2022년 9월 8일
답변: Kartik 2023년 2월 23일
Hi, I've recently installed Matlab, and I am following an introductory booklet to help me get to grips with the code. One thing that I am having a problem with is indenting code. When I press the tab button on my keyboard, nothing happens. I have checked in preferences to see that the tab button is mapped to "tab", so it should tab 8 spaces (as I can see is the default amount) but rather, nothing happens. The same is the case when I highlight code and tab after typing it, which, from what I have read, should indent it also. I am using Matlab_R2022a on an Apple MacBook, with macOS Monterey installed. Anybody got any ideas as to why my tab key isn't working? It works in all other applications, and indents as expected, on microsoft word, for example, so is not a physical issue with the key.
  댓글 수: 2
chrisw23
chrisw23 2022년 9월 8일
try to set a space before tabbing
Tobias
Tobias 2022년 9월 8일
@chrisw23 as in hitting space and then tab? This doesn't do anything (apart from inserting a space).

댓글을 달려면 로그인하십시오.

답변 (1개)

Kartik
Kartik 2023년 2월 23일
Hi,
It sounds like your issue might be related to the settings in your MATLAB Editor Preferences. Here are some things you can try to get your Tab key working properly:
  1. Check your Editor Preferences: Go to Preferences > Editor/Debugger > Editor > Language, and make sure that the "Indent with tabs" checkbox is selected.
  2. Try changing the Tab key behaviour: In the Editor Preferences, go to the "Key bindings" tab, and look for the "Tab" key. Try changing the behaviour to "Indent selection" or "Insert tab character" and see if that works.
  3. Check for conflicting keyboard shortcuts: It's possible that another application or system setting is overriding the Tab key in MATLAB. Go to System Preferences > Keyboard > Shortcuts and look for any conflicting keybindings that might be interfering with the Tab key in MATLAB.
  4. Try resetting MATLAB preferences: If none of the above steps work, try resetting MATLAB preferences to their default settings. To do this, go to Preferences > General > Reset Preferences and follow the prompts.
For more information, you can refer to the following MathWorks documentation:

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by