Skip to content

Add DateTime placeholders to AutoType feature#4409

Merged
droidmonkey merged 4 commits intokeepassxreboot:developfrom
CompileNix:feature/AutoType-DateTime-Placeholders
Mar 19, 2020
Merged

Add DateTime placeholders to AutoType feature#4409
droidmonkey merged 4 commits intokeepassxreboot:developfrom
CompileNix:feature/AutoType-DateTime-Placeholders

Conversation

@CompileNix
Copy link
Contributor

@CompileNix CompileNix commented Mar 8, 2020

This PR adds support for AutoType DateTime placeholders, in the same way KeePass2 has it.

https://keepass.info/help/base/placeholders.html

PS: This is my first contribution to a C++ project in general and KeePassXC specifically :)

Type of change

  • ✅ New feature (non-breaking change which adds functionality)

Description and Context

I used DateTime placeholders in KeePass2 all the time, but switched to KeePassXC. So i added the following AutoType placeholders.

Placeholder Is Replaced By
{DT_SIMPLE} Current local date/time as a simple, sortable string. For example, for 2012-07-25 17:05:34 the value is 20120725170534.
{DT_YEAR} Year component of the current local date/time.
{DT_MONTH} Month component of the current local date/time.
{DT_DAY} Day component of the current local date/time.
{DT_HOUR} Hour component of the current local date/time.
{DT_MINUTE} Minute component of the current local date/time.
{DT_SECOND} Seconds component of the current local date/time.
{DT_UTC_SIMPLE} Current UTC date/time as a simple, sortable string.
{DT_UTC_YEAR} Year component of the current UTC date/time.
{DT_UTC_MONTH} Month component of the current UTC date/time.
{DT_UTC_DAY} Day component of the current UTC date/time.
{DT_UTC_HOUR} Hour component of the current UTC date/time.
{DT_UTC_MINUTE} Minute component of the current UTC date/time.
{DT_UTC_SECOND} Seconds component of the current UTC date/time.

Screenshots

  • None

Testing strategy

  1. Create a new Database
  2. Add a new Entry
  3. Add Auto-Type Window Assosiation
    Title: * - Notepad
    Use a specific sequence for this assosiation: DT_SIMPLE: {DT_SIMPLE}{ENTER}DT_YEAR: {DT_YEAR}{ENTER}DT_MONTH: {DT_MONTH}{ENTER}DT_DAY: {DT_DAY}{ENTER}DT_HOUR: {DT_HOUR}{ENTER}DT_MINUTE: {DT_MINUTE}{ENTER}DT_SECOND: {DT_SECOND}{ENTER}DT_UTC_SIMPLE: {DT_UTC_SIMPLE}{ENTER}DT_UTC_YEAR: {DT_UTC_YEAR}{ENTER}DT_UTC_MONTH: {DT_UTC_MONTH}{ENTER}DT_UTC_DAY: {DT_UTC_DAY}{ENTER}DT_UTC_HOUR: {DT_UTC_HOUR}{ENTER}DT_UTC_MINUTE: {DT_UTC_MINUTE}{ENTER}DT_UTC_SECOND: {DT_UTC_SECOND}
  4. Enable Global Auto-Type
  5. Define Global Auto-Type shortcut
  6. Open Notepad
  7. Perform Auto-Type via Global Auto-Type shortcut

Expected (example) result, for DateTime Sun, 08 Mar 2020 18:11:43 GMT and local timezone UTC +0100:

DT_SIMPLE: 20200308191143
DT_YEAR: 2020
DT_MONTH: 03
DT_DAY: 08
DT_HOUR: 19
DT_MINUTE: 11
DT_SECOND: 43
DT_UTC_SIMPLE: 20200308181143
DT_UTC_YEAR: 2020
DT_UTC_MONTH: 03
DT_UTC_DAY: 08
DT_UTC_HOUR: 18
DT_UTC_MINUTE: 11
DT_UTC_SECOND: 43

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]

@CompileNix
Copy link
Contributor Author

You may want to add mingw-w64-$(uname -m)-clang to Set up Build Environment on Windows, which installes the requirement clang-format for make format

@droidmonkey
Copy link
Member

Good point!

@droidmonkey
Copy link
Member

I'm surprised we don't have an issue requesting this feature parity.

@CompileNix CompileNix requested a review from phoerious March 18, 2020 18:01
@droidmonkey droidmonkey dismissed phoerious’s stale review March 19, 2020 02:00

Changes were made

@droidmonkey droidmonkey merged commit 5927b62 into keepassxreboot:develop Mar 19, 2020
@droidmonkey droidmonkey added this to the v2.6.0 milestone Mar 19, 2020
@CompileNix
Copy link
Contributor Author

\o/

lerignoux pushed a commit to lerignoux/keepassxc that referenced this pull request May 28, 2020
droidmonkey added a commit that referenced this pull request Jul 7, 2020
Added

- Custom Light and Dark themes [#4110, #4769, #4791, #4796, #4892, #4915]
- Compact mode to use classic Group and Entry line height [#4910]
- View menu to quickly switch themes, compact mode, and toggle UI elements [#4910]
- Search for groups and scope search to matched groups [#4705]
- Save Database Backup feature [#4550]
- Sort entries by "natural order" and move lines up/down [#4357]
- Option to launch KeePassXC on system startup/login [#4675]
- Caps Lock warning on password input fields [#3646]
- Add "Size" column to entry view [#4588]
- Browser-like tab experience using Ctrl+[Num] (Alt+[Num] on Linux) [#4063, #4305]
- Password Generator: Define additional characters to choose from [#3876]
- Reports: Database password health check (offline) [#3993]
- Reports: HIBP online service to check for breached passwords [#4438]
- Auto-Type: DateTime placeholders [#4409]
- Browser: Show group name in results sent to browser extension [#4111]
- Browser: Ability to define a custom browser location (macOS and Linux only) [#4148]
- Browser: Ability to change root group UUID and inline edit connection ID [#4315, #4591]
- CLI: `db-info` command [#4231]
- CLI: Use wl-clipboard if xclip is not available (Linux) [#4323]
- CLI: Incorporate xclip into snap builds [#4697]
- SSH Agent: Key file path env substitution, SSH_AUTH_SOCK override, and connection test [#3769, #3801, #4545]
- SSH Agent: Context menu actions to add/remove keys [#4290]

Changed

- Complete replacement of default database icons [#4699]
- Complete replacement of application icons [#4066, #4161, #4203, #4411]
- Complete rewrite of documentation and manpages using Asciidoctor [#4937]
- Complete refactor of config files; separate between local and roaming [#4665]
- Complete refactor of browser integration and proxy code [#4680]
- Complete refactor of hardware key integration (YubiKey and OnlyKey) [#4584, #4843]
- Significantly improve performance when saving and opening databases [#4309, #4833]
- Remove read-only detection for database files [#4508]
- Overhaul of password fields and password generator [#4367]
- Replace instances of "Master Key" with "Database Credentials" [#4929]
- Change settings checkboxes to positive phrasing for consistency [#4715]
- Improve UX of using entry actions (focus fix) [#3893]
- Set expiration time to Now when enabling entry expiration [#4406]
- Always show "New Entry" in context menu [#4617]
- Issue warning before adding large attachments [#4651]
- Improve importing OPVault [#4630]
- Improve AutoOpen capability [#3901, #4752]
- Check for updates every 7 days even while still running [#4752]
- Improve Windows installer UI/UX [#4675]
- Improve config file handling of portable distribution [#4131, #4752]
- macOS: Hide dock icon when application is hidden to tray [#4782]
- Browser: Use unlock dialog to improve UX of opening a locked database [#3698]
- Browser: Improve database and entry settings experience [#4392, #4591]
- Browser: Improve confirm access dialog [#2143, #4660]
- KeeShare: Improve monitoring file changes of shares [#4720]
- CLI: Rename `create` command to `db-create` [#4231]
- CLI: Cleanup `db-create` options (`--set-key-file` and `--set-password`) [#4313]
- CLI: Use stderr for help text and password prompts [#4086, #4623]
- FdoSecrets: Display existing secret service process [#4128]

Fixed

- Fix changing focus around the main window using tab key [#4641]
- Fix search field clearing while still using the application [#4368]
- Improve search help widget displaying on macOS and Linux [#4236]
- Return keyboard focus after editing an entry [#4287]
- Reset database path after failed "Save As" [#4526]
- Use SHA256 Digest for Windows code signing [#4129]
- Improve handling of ccache when building [#4104, #4335]
- macOS: Properly re-hide application window after browser integration and Auto-Type usage [#4909]
- Auto-Type: Fix crash when performing on new entry [#4132]
- Browser: Send legacy HTTP settings to recycle bin [#4589]
- Browser: Fix merging browser keys [#4685]
- CLI: Fix encoding when exporting database [#3921]
- SSH Agent: Improve reliability and underlying code [#3833, #4256, #4549, #4595]
- FdoSecrets: Fix crash when editing settings before service is enabled [#4332]
@phoerious phoerious added pr: new feature Pull request adds a new feature and removed new feature labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: Auto-Type pr: new feature Pull request adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants