How to view string as it is being entered in keyring::key_set()

79 Views Asked by At

When I type into the pop-up triggered by key_set() I am unable to view the text I am typing. Is there a way to override this default feature that masks the string, or toggle it on & off so that users can check their spelling without having to use key_get()?

enter image description here

1

There are 1 best solutions below

2
harre On

The keyring-package is dependent on the package askpass (https://github.com/r-lib/askpass). The answer is OS dependent, but for MacOS (as you use) you could do as follows.

Navigate to the package library (use .libPaths()), find the package library for askpass and edit the file mac-simplepass with a suitable text editor. Find line 7.

Remove: with hidden answer

That gives a new line 7: display dialog args with icon note default button "OK" default answer ""

You may need to restart.

That being said, however, consider using keyring::key_set_with_value() without the prompt, if you need to see what you're writing.