Switching focus between editor and terminal in Kate
Asked Answered
S

5

16

When working in Unix with various programming languages I often use Kate as my primary editor. It has a really nice function of being able to open a built-in terminal window which is quite useful.

The problem is that switching back and forth to the terminal view using a mouse is quite a pain and I can't find any shortcuts for this. The only shortcut I could find is for closing the entire terminal (not just changing the focus). This is a bit annoying as it causes the text in the terminal window to get truncated (I think it's a known Kate bug).

Does anyone know a better shortcut?

Scatter answered 23/11, 2009 at 12:37 Comment(1)
F4 (or some other shortcut) will be convenient to setup as a toggle for opening / hiding terminal panel — https://mcmap.net/q/735508/-switching-focus-between-editor-and-terminal-in-kateBelfry
L
7

Note that the Kate bug has been fixed. The correct answer to this question is now F4.

Lump answered 6/5, 2013 at 8:28 Comment(2)
Unfortunately is not working for me out of the box, however it can be configured in shortcuts, works great!. Kubuntu 16.10Pernell
This is working for me in Ubuntu 20.04. It's not very obvious though where there focus is, just a slight change to the cursors. This initially made me think it wasn't working.Hinkel
R
5

There's a "Focus Terminal" shortcut in the "Configure shortcuts"

There you can set it up. F4 didn't work by default in my case and Shift+Tab worked only in one direction.

Resolution answered 7/10, 2013 at 1:33 Comment(0)
R
3

this is a bug in kate. possible workarounds: a) shift back by pressing Shift+Tab, b) try another shortcut (some do work). see also Bug 157496: Alt+[Key] shortcuts for menu items do not work.

Riser answered 23/11, 2009 at 13:0 Comment(1)
Yeah, they have a lot of bugs. Unfortunately, Shift+Tab didn't work. The only thing that seems to work for now is the shortcut that toggles the terminal.Scatter
F
0

Today (Kate v 22.08.2), it's Settings > Configure Keyboard Shortcuts > Type "terminal" in Search box > edit shortcut for "Focus Terminal Panel". For me, the default was Ctrl+Shift+ F4, while F4 hid the terminal. I swapped them because it's more convenient for me. The focus shift is only visible by appearance of the cursor changing slightly.

Screenshot of shortcut settings

Fullscale answered 5/11, 2022 at 0:38 Comment(0)
B
0

Defocus Terminal action's default F4 shortcut (which opens terminal, then with next F4 presses switches focus between text editor and terminal) can be replaced on Show Terminal action which shows / hides terminal panel. In this way F4 will be working as showing / hiding terminal panel toggle. Like in Dolphin KDE file manager.

To setup:

  • Got to Settings -> Configure Keyboard Shortcuts
  • Search by show terminal
  • Set for this action custom F4 shortcut. Confirm that this shortcut will override 'Defocus Terminal' shortcut. Or choose some other shortcut if you want to keep default behavior for F4.
Belfry answered 25/7, 2024 at 15:2 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.