Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch between open databases #2008

Closed
pquerner opened this issue May 30, 2018 · 16 comments · Fixed by #2402
Closed

Switch between open databases #2008

pquerner opened this issue May 30, 2018 · 16 comments · Fixed by #2402

Comments

@pquerner
Copy link

Expected Behavior

Allow easier switches between open databases.

Current Behavior

Is not a feature.

Possible Solution

Add the feature.

Context

Having open multiple databases (Tabs) in one keepassxc instance is nice, but it would be better if you would allow better switching through the open databases.

On Mac the default hotkey is CMD+1...0, which switches you to open tabs in the current program (which is in focus)

Debug Info

KeePassXC - Version 2.3.3
Revision: 0a155d8

Libraries:

  • Qt 5.9.3
  • libgcrypt 1.8.2

Operating system: macOS High Sierra (10.13)
CPU architecture: x86_64
Kernel: darwin 17.5.0

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
@droidmonkey
Copy link
Member

CTRL+TAB?

@pquerner
Copy link
Author

pquerner commented May 30, 2018

Does that work on Windows? On Mac it doesnt.

CTRL+TAB works on other programs (such as Finder).

@varjolintu
Copy link
Member

For some reason CTRL+TAB has never worked on macOS.

@kmohrf
Copy link

kmohrf commented Jun 6, 2018

it would be nice to have Ctrl+PgUp and Ctrl+PgDn implemented like most browsers, terminal emulators and others tools have. I didn’t know Ctrl+Tab was a thing but the other two keyboard shortcuts seem intuitive to me.

@droidmonkey
Copy link
Member

This is nothing new, in fact we don't control that behavior at all. Qt handles the shortcut to switch tabs within the tab widget that we use.

@pquerner
Copy link
Author

pquerner commented Jun 6, 2018

src: https://stackoverflow.com/a/45387865

void MainWindow::bootStrap()
{
    // create shortcut
    QShortcut *shortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);

    // connect its 'activated' signal to your function 'foo'
    QObject::connect(shortcut,    &QShortcut::activated,
                     this,        &MainWindow::foo);
}

// somewhere in the code, define the function 'foo'
void MainWindow::foo()
{
    qDebug() << "Ctrl+Q pressed.";
}

Maybe intercept CTRL+TAB (and CTRL+SHIFT+TAB) and set the focus manually?

@varjolintu
Copy link
Member

Actually it's Qt::Key_Meta in macOS instead of Qt::CTRL. But it still doesn't work combined with Qt::Key_Tab even if set as a new shortcut.

@erikjoling
Copy link

I would expect CTRL + Page Up / Page Down to switch between database tabs. This is default behavior on KeePass 2.x (Windows). I think this is a basic convention as Firefox also uses this shortcut to switch between tabs.

@jerome-tgl
Copy link

The issue has been closed yet I'm still unable to switch tabs on KeppPassXC 2.4.3 running on MacOS. Pressing Ctrl/Cmd + Tab/PgUp/PgDn does nothing. Am I missing something?

@droidmonkey
Copy link
Member

Just testing CMD+PGUP/PGDN on macOS 10.14 and it worked flawlessly.

@jerome-tgl
Copy link

Just testing CMD+PGUP/PGDN on macOS 10.14 and it worked flawlessly.

You're right, my bad.

@erikjoling
Copy link

It doesn't work for me if the focus is in the search field. I have to tab out of it and then I can use CTRL + TAB (on linux elementaryOS)

@droidmonkey
Copy link
Member

droidmonkey commented Jul 10, 2019

That must be a limitation of Linux keyboard shortcut handling because CTRL+TAB and CTRL+SHIFT+TAB are defined at the application level to switch tabs. Switching tabs from the search box works on Windows and macOS.

@erikjoling
Copy link

You're probably right :)

@dancojocaru2000
Copy link

Any idea wht Ctrl+Tab isn't possible on macOS?

It seems very weird for the keyboard shortcut to be Ctrl + PgUp/PgDown, since apart from the keyboard with numeric pad Macs don't even have PgUp/PgDown keys.

@varjolintu
Copy link
Member

Any idea wht Ctrl+Tab isn't possible on macOS?

It seems very weird for the keyboard shortcut to be Ctrl + PgUp/PgDown, since apart from the keyboard with numeric pad Macs don't even have PgUp/PgDown keys.

It must be some Qt restriction. I've tried everything and still cannot get it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants