Commit Graph

278 Commits

Author SHA1 Message Date
Jonathan White
195e5b53f2 Reduce complexity of {CLEARFIELD} on Linux
Instead of `CTRL + HOME, CTRL + SHIFT + END, BACKSPACE` use `HOME, SHIFT + END, BACKSPACE`

Fixes #10006
2024-04-28 18:22:13 -04:00
Jonathan White
19d4f7334c Correct minor issues in translations 2024-04-28 18:16:10 -04:00
Jonathan White
35af1c6695 Fix focus loss when using Auto-Type from locked database
* Fixes #10439
2024-04-23 20:56:31 -04:00
Jonathan White
e700195f0a Add 1Password 1PUX and Bitwarden JSON Importers
* Closes #7545 - Support 1Password 1PUX import format based on https://support.1password.com/1pux-format/

* Closes #8367 - Support Bitwarden JSON import format (both unencrypted and encrypted) based on https://bitwarden.com/help/encrypted-export/

* Fixes #9577 - OPVault import when fields have the same name or type

* Introduce the import wizard to handle all import tasks (CSV, KDBX1, OPVault, 1PUX, JSON)

* Clean up CSV parser code to make it much more efficient and easier to read

* Combine all importer tests (except CSV) into one test file
2024-03-09 10:44:54 -05:00
Waqar Ahmed
a472ef8a93
Allow configuring keyboard shortcuts (#9643)
Closes #2689

The design of the respective code is loosely based on KDE's KActionCollection. The ActionCollection manages all actions that can be shortcut configured. These actions are then exposed in the config and a user can assign a different shortcut.

Actions inside the MainWindow have been added to the ActionCollection.

---------

Co-authored-by: Jonathan White <support@dmapps.us>
2024-02-04 06:29:04 -05:00
tenzap
85d474318b
Fix build failure with Qt5.6 (#9382) 2023-05-07 23:22:57 -04:00
Dmytro Maslenko
bba0c09b42 Fix text selection for clear_field step on Mac 2023-02-07 06:57:45 -05:00
Jonathan White
d90b32a7c9 Support {MODE=VIRTUAL} on macOS
* Fix #8433
2023-01-29 20:12:48 -05:00
Rosen Penev
52af8a5e2a
clang-tidy: use = default (#7999) 2023-01-29 15:47:13 -05:00
Rosen Penev
318157d242
clang-tidy: use braced init list (#7998) 2023-01-29 10:05:44 -05:00
luzpaz
880cc230ac
Fix various typos (#8748) 2023-01-29 09:38:44 -05:00
Jonathan White
b0a68ea0de Improve various application icons 2022-09-08 06:46:48 -04:00
Bernhard Kirchen
861fe2e5a9 cmake: make libxi and libxtst a requirement with autotype enabled 2022-06-19 10:34:52 -04:00
Bernhard Kirchen
63a5e474a6 cmake: emit warning if X11_Xi or X11_XTest not found
at least on Debian, a bullseye installation, the X11 development files
may be installed without the libxi-dev or the libxtest-dev packages.
this leads to the autotype shared library libkeepassxc-autotype-xcb.so
not being built without any complaint from cmake.

this commit makes cmake emit warning messages that shall hint anyone
building themselves that autotype will not work without these libs.
2022-06-19 10:34:52 -04:00
Jonathan White
20a2a96222 Auto-Type: PICKCHARS can specify attribute and ignore BEEP
* Fix #7726 - Ignore BEEP Auto-Type token when it includes spaces and numbers as well
* Close #8103 - Allow specifying specific attribute to use with PICKCHARS. If none specified, it defaults to Password.
2022-06-09 10:05:03 -04:00
Michael Ziminsky (Z)
bc0a5a9440 Fix autotype menu entries on Windows 2022-06-05 22:02:23 -04:00
Jonathan White
b5e0572155 Fix Auto-Type gui guard for tests
Prevent showing gui error dialogs when no gui is present. This can occur during auto-type tests.
2022-06-05 07:04:34 -04:00
Jonathan White
0f3a2531e7 Fix use of modifiers under macOS
* Fix #6463
2022-06-05 07:04:23 -04:00
J.M. Dana
a740fe128c Add password strength indicator to PasswordEditWidget
Fixes #7437 (entry edit view only)
Fixes #5220
2022-05-31 07:34:50 -04:00
Rosen Penev
7e1d980d08 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-01 16:02:02 -04:00
Jonathan White
7d7c635423 Disable debug messages in release builds
Also correct / remove various debug messages
2022-04-03 13:26:12 -04:00
Jonathan White
097be1a5cd Fix Auto-Typing single character placeholders
* Fix #7743 - Include # in placeholder list
* This change fixes typing single character placeholders (escaped placeholders) on Windows. Previously we were sending these as raw key presses which didn't properly press Shift or other modifiers. Now they are sent as unicode characters unless in virtual mode (the expected behavior).
2022-04-02 12:51:33 -04:00
Jonathan White
c5d25ac371 Fix Auto-Type modifiers on Windows
Also add documentation on modifiers.

* Fix #7626
2022-04-02 12:51:33 -04:00
Toni Spets
fc5a07b46d Auto-Type: Map ASCII dead keys on Linux
Special handling of ASCII keys that are common in passwords that
may be dead on the current keyboard layout and prevents going to
keysym emulation fallback.
2022-03-28 06:24:58 -04:00
Jonathan White
4178e72fe0 Reduce delay when searching entries in Auto-Type select dialog
* Fix #7596
2022-03-23 16:15:45 -04:00
Jonathan White
eac60b3228 Correct timing issue with entry level Auto-Type on some platforms
* Fixes #7584
2022-03-22 16:10:05 -04:00
Jonathan White
9e21df2515
Remove unused variable from Windows Auto-Type 2022-03-21 07:41:56 -04:00
alcroito
ab153a24ec Run macdeployqt only once at install time
Instead of running macdeployqt once for each extra helper binary and
plugin (plus the main run for the application itself), collect all the
binaries that should be processed and run macdeloyqt only once after
all the binaries have been installed.

This also moves the main app macdeployqt call from a POST_BUILD step
to an install(CODE) step, making increment rebuilds of the app faster.

To ensure that macdeployqt is called after all the binaries are
installed, a new post_install subdirectory is needed to
circumvent CMake's limitation regarding the default order of
installation.
CMake first runs the current directory install() calls and then it's
child subdirectory ones. Because we want macdeployqt to be the last
install() call, it needs to be done inside a subdirectory that is
added last.

Note due to a bug in macdeployqt, the deployed app inside the .dmg
file will fail to run on arm macs, due to broken code signature.
See https://bugreports.qt.io/browse/QTBUG-101696 for details.

For the final release, the release-tool should take care of proper
resigning.
2022-03-21 00:15:57 +01:00
Jonathan White
8a7eb36950 Several fixes for Auto-Type
* On Windows, offer explicit methods to use the virtual keyboard style of typing. This partially reverts 1150b69836 by going back to the standard unicode method by default. However, uses can either add {MODE=VIRTUAL} to their sequence or choose "Use Virtual Keyboard" / CTRL+4 from the selection dialog.

* Took this opportunity to clean up the signature of  AutoType::performAutoType and AutoType::performAutoTypeWithSequence by removing the "hideWindow" attribute.

* Show keyboard shortcuts on the selection dialog context menu

* Fix selection dialog help icon color when in dark theme
2022-03-19 08:23:53 -04:00
Janek Bevendorff
e07d143c9b
Skip "StatusIndicator" window in Auto-Type window list (#7527)
Starting with macOS 12.2, when the audio recording indicator is shown, the
"Window Server" process injects a "StatusIndicator" window into the list of
active windows, which messes with Auto-Type's window title matching. This
window has an Alpha value of 1 (so technically, it is not invisible), and it
is always in front of all other windows. Hence, the only way to skip it is by
title and owner name.

Fixes #7418
2022-03-12 21:07:36 +01:00
alcroito
abfebea4f2 Fix rpath handling and deployment of macOS helper binaries
CPack by default invokes the 'make install' target to install
all project files into a staging area for further packaging.

The order of installation follows the order of install() commands.

One of the first install() commands is the one that installs the
KeePassXC.app bundle and all the contents inside of it,
which includes POST_BUILD copied binaries like keepassxc-cli
and keepassxc-proxy.

Subsequent install(TARGETS) commands would then override the
keepassxc-cli and keepassxc-proxy binaries inside the staging area
with the ones which didn't have macdeployqt run on them (the ones from
src/cli and src/proxy).
Launching the binaries would then fail because of missing rpath
adjustments.

The libkeepassxc-autotype-cocoa.so library was working fine because
there is no install(TARGETS) command for it in a WITH_APP_BUNDLE build,
so the POST_BUILD copy with the adjusted rpaths was preserved.

To fix the issue and make the handling consistent, macdeployqt is no
longer run at POST_BUILD time, but instead at 'make install' time,
after each binary is installed by install(TARGETS).

libkeepassxc-autotype-cocoa.so also has its install command run
unconditionally now.

The build dir binaries that are POST_BUILD copied into
src/KeePassXC.app continue to run because they use the build dir
rpaths that CMake embeds by default. They don't macdeployqt run for
them anymore, which slightly speeds up the build time.

Fixes: #7475
2022-03-05 11:03:50 -05:00
Jonathan White
e85425050b Properly press AltGr key in Windows Auto-Type
* Fix #7456
2022-02-25 06:05:21 -05:00
Toni Spets
bfbc0e5ec6 Auto-Type: Allow retyping with automatic relock
If relock after performing Auto-Type is enabled it will wait until
specified timeout before doing so.

Retype time is now configurable and is decreased from the old
hardcoded 30 seconds down to 15 seconds to keep the default a bit
more secure while still allowing the user to set it higher for
their liking.

To restore old behavior the user can set retype time to 0 which
will make the database relock instantly.

Auto-Type relock setting relocated to Auto-Type tab to group it
better with the other Auto-Type settings.
2022-02-20 16:12:16 -05:00
Jonathan White
58615d78bd Fix using modifier keys
* Fix error in regex that prevented use of modifier keys in general.
* Added '#' modifier to press the "Meta" button. This correlates to the Windows key on Windows and Command key on macOS.
* Fix #6695 - send proper modifier keys based on documentation
2022-02-08 19:07:43 -05:00
Jonathan White
1150b69836 Fix Windows Auto-Type sending characters to virtualized guests
* Fix #1833
2022-02-08 19:07:43 -05:00
Toni Spets
606096278b Auto-Type: Remember previous selected global match
This makes using multi-stage login forms slightly easier as you
can avoid typing the search terms multiple times.
2021-11-26 10:31:20 -05:00
louib
004f2b6801 Removing QWidget dependency from src/core. 2021-11-12 07:41:30 -05:00
Toni Spets
3b1acd0831
Auto-Type: Reimplement X11 keysym emulation (#7098)
* Fix Regression since 4d07507

* Auto-Type: Workaround X server default keymap bug

If there's a system wide configuration through xorg.conf for a default keyboard layout and it's not updated by the WM/DE at startup the Xkb extension seems to be somewhat confused with XTEST and the layout somehow defaults to US ANSI.

Reading the keyboard description and writing it back without changes works around this.
2021-11-04 23:01:47 -04:00
varjolintu
c7cdce6e33 Support for triggering Global Auto-Type from browser extension 2021-10-10 23:41:58 -04:00
smlu
0c6587b5b7 Add support for Microsoft Visual Studio buildchain
* Use C++17 when using MSVC compiler
* Remove unneeded header files and macros
* Removed unnecessary Yubikey cmake file
* Enhance release tool
* Updated INSTALL.md
2021-09-19 17:16:45 -04:00
peter
6b14b5dc27 Optimize includes across code base 2021-07-13 22:08:33 -04:00
Jonathan White
17326dc3ec Auto-Type: Resolve username/password when copying to clipboard
* Fix #3882
* Add nullptr checks as well
2021-05-12 23:15:49 -04:00
Jonathan White
5c709f0da3 Auto-Type: Increase max inter-type delay to 500 ms 2021-04-24 09:31:46 -04:00
Toni Spets
31aa5e12e5 Auto-Type: PageUp/PageDown scrolling for entries
Fixes #4530
2021-04-08 20:00:40 -04:00
Toni Spets
ca8abecc4b Auto-Type: Abort keystroke if modifiers held on X11
Releasing lock modifiers during Auto Type does not work reliably
on X11 and can cause some modifiers to get stuck and more precisely
layout switching can get stuck.

Instead of trying to find out what modifiers to release we can just
abort when the user is holding modifiers that may affect the typing
sequence.

Fixes #6350
2021-04-01 22:58:33 -04:00
Toni Spets
371bd2e51b
Auto-Type: Shortcuts for selection dialog (#6361)
* Shortcut to toggle search all entries
* Select first match only when we have a window match

When we default to full database search it's possible the user would select the first match without by accident.

In this case when our query is empty we don't select anything and you need to either type something or press down to select the first item.

* Added username, password, and TOTP keyboard shortcuts and a help tip

* Closes #6176

Co-authored-by: Jonathan White <support@dmapps.us>
2021-03-31 23:27:56 -04:00
Toni Spets
8c9530e3ec Auto-Type: Allow actions to fail and be retried
AutoTypeActions are required to return a result object with
information if they can be retried or not. An error string is
also provided to show a user friendly message why said action did
not succeed if even after retries it keeps failing.

This is a prerequisite for waiting for modifier keys to be released
on X11.
2021-03-31 21:20:51 -04:00
Toni Spets
4d07507739 Auto-Type: Support multiple Xkb layouts
Completely rewritten XCB Auto-Type keymap system.

 - supports multiple simultaneous layouts
 - prefers current layout if it has all keysyms available
 - removed hardcoded KeySymMap
 - removed clunky custom KeySym emulation

Biggest breaking change is removing KeySym emulation for keys that
do not exist in any of the layouts currently in use. It would be
possible to make it work but if you are trying to type syms that
are not available in any of your layouts you are abusing it. It
also adds unnecessary complexity and opens up timing issues when
the keymap is modified on-the-fly. Now we are just reading it.

This also workarounds a Qt related issue where QX11Info::display()
returns a connection to X server that fails to receive updated
keymap data when client settings change. We use our own connection
now to get it working.
2021-03-26 06:16:37 -04:00
Jonathan White
bc08913c61 Auto-Type: Allow selection of modal dialogs on X11
* Fix #5958 - Modal dialogs do not have WM_STATE set even though they are a valid top-level window with a valid name. In this case, we need to poll for WM_TRANSIENT_FOR which returns the top level window the dialog is a child of.
2021-03-05 18:06:30 -05:00
Jonathan White
8d058cbd04
Additional Auto-Type improvements based on PR feedback
* Improve documentation and remove external links to keepass.info documentation
2021-02-22 07:41:23 -05:00