This forum has been archived. All content is frozen. Please use KDE Discuss instead.

shortcut to enter today's date into the active text field

Tags: None
(comma "," separated)
stevea
Registered Member
Posts
21
Karma
0
I am trying to set up a shortcut which will enter today's date into the active text field.
I'm not sure if it is even possible to do this directly with a shortcut...
I've set up a shortcut which runs a bash script using the date command - but how to pass the output of the script to the text field?
Maybe there is some other way to do this??
stevea
Registered Member
Posts
21
Karma
0
ok, solved
used xdotool in a bash script
Code: Select all
#! /bin/sh
date=$(date +%y-%m-%d)
sleep 0.2
xdotool type $date

will enter today's date into all active text fields i have tried so far - useful!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]