how to use custom keyboard shortcuts

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Locked
bradwww
Level 1
Level 1
Posts: 10
Joined: Sun Jun 13, 2010 7:11 pm

how to use custom keyboard shortcuts

Post by bradwww »

i have read this doc: http://library.gnome.org/users/user-gui ... tcuts.html

but it is not clear - it tells you to enter a "command" without definition.

i try to enter a custom keyboard shortcut (macro)

i want the shortcut to type the following letters into the current application:

eieio

when i press the key alt-e - all i get when assigning "eieio" as the command to type when i press alt-e is:

"error when trying to run (eieio) which is linked to the key (<alt>g)"

can anyone help? you all must use some type of shortcut to enter your email all day long for you - right? thanks!

brad
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1435
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: how to use custom keyboard shortcuts

Post by Pilosopong Tasyo »

To be blunt, you're looking at the wrong place. What you are trying to do is assign a piece of boilerplate text to a shortcut key, much like what you would do with the Macro program in Windows. But what actually happens is entirely different. When you assigned eieio to Ctrl+E, Linux will attempt to execute a program called eieio once you hit Ctrl+E instead of typing it out for you. Obviously, eieio doesn't exist in your system, hence the error message. What you are looking for is a macro program similar in function to that found in Windows. AFAIK, there are no decent and simple GUI macro programs in Linux that will do the same job as you'd expect in the Windows version. (Anyone who knows of such a applet, feel free to chime in, just don't flame. :D) There are some similar applets in the repository (pnee, cnee, gnee, xnee, xmacro -- take your pick) but I don't think they do exactly what you expect. You could also check out sourceforge.net. But that's treading outside the safety of the repositories, so you're on your own.

Having said that, why not just use vanilla copy/cut-and-paste? You can always use the keyboard shortcuts for copying (Ctrl+C), cutting (Ctrl+X) and pasting (Ctrl-V) for your boilerplate text. You can also do copy-once-paste-many operations. So any piece of text that you want to appear multiple times in your document, just copy the first occurence and paste to your heart's content.
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
bradwww
Level 1
Level 1
Posts: 10
Joined: Sun Jun 13, 2010 7:11 pm

Re: how to use custom keyboard shortcuts

Post by bradwww »

Pilosopong Tasyo

thanks so much for the response, i am really new to linux (first day).

i looked for the apps you mention, found them to be bits and peices. frankly it is hard for me to believe that, having used a macro recorder for 10 years on windows, that such a simple technology does not yet exist in linux with how far it has come. tell me, do you linux users really type your email address and passwords over each time it is required by a web form or email app or whatever? i have been using macro express so long i simply cannot go back to all that manual labor!

adding text for a hotkey is only one of the things i do with macros - although it is what i use the most - i also assign alternate keys to things like ctrl-z instead of ctrl-F4 close window for example.

how would you cut and paste with a single keystroke? there is no linux command to do simple stuff like take the contents of a text file and dump it into the keyboard buffer when you hit a key combination? i can't see how cut and paste would save much time for example when replacing 12 characters, it seems like it would take nearly that many keystrokes to bring up the boilerplate text document, choose the text section i want, copy it, close, return to the original app and paste.

so you have said nothing exists, can i contract with someone to build such a beast? any good suggestions on how to take that route?

barring that, can someone help me understand how to use tools to get what i need to do done? for example something like this i have no idea how to download and install:
record playback: http://members.home.nl/wijnenjl/Record_ ... EN_01.html

thanks for any help anyone can provide.

brad
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1435
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: how to use custom keyboard shortcuts

Post by Pilosopong Tasyo »

Hi bradwww,

Just some thoughts on your reply.
tell me, do you linux users really type your email address and passwords over each time it is required by a web form or email app or whatever? i have been using macro express so long i simply cannot go back to all that manual labor!
Not really. AFAIC, I just tell Firefox or the website to remember my credentials when I log-in to a site. I only have to do that once -- the first time only. I don't have a need for a macro recorder to do that for me. Besides, it's so trivial to type in the credentials it only takes a few seconds. I mean it is such a big deal of an annoyance to spend a few seconds just to type in your credentials for the first time and set the website/Firefox to remember you so it doesn't have to ask you next time? Or even if it does, the log-in form already have your credentials "typed-in" so all you have to do is click the Log-in button. Now, as far as web forms are concerned, there are Firefox extensions that will take care of that for you automatically. All you need to do is fill-in the form the first time. No need for a macro recorder to do that.
...i also assign alternate keys to things like ctrl-z instead of ctrl-F4 close window for example.
Now THAT you can do with Keyboard Shortcuts.
i can't see how cut and paste would save much time for example when replacing 12 characters, it seems like it would take nearly that many keystrokes to bring up the boilerplate text document, choose the text section i want, copy it, close, return to the original app and paste.
Your example is just plain absurd. If you're just replacing 12 characters, or a word or two for that matter, why not just directly type the replacement? :lol: You're making it look harder than it really is.

-----

I'm not contesting nor downplaying the/your need for a (simple-like-the-Windows-version) macro recorder. Heck I think it's one applet that's worth porting. It's useful and I missed it as well. But you also have to take into consideration that this is Linux and you are a neophyte to the OS as well (as you said -- first day). Linux is NOT exactly a free version of Windows (althought there are users who think of it like that). So expect a lot of things done differently -- not necessarily difficult -- in Linux. It doesn't help if a person who is so used to using Windows for so long to expect things to be the same in Linux. But it does help if Windows is unlearned for the time being when learning Linux.

I said earlier that as far as I know, there are no decent and simple GUI macro programs in Linux that will do the same job as you'd expect in the Windows version. But I also said that anyone who knows of such a applet to feel free to chime in. Wait a while, the rest of the planet is still sleeping or are just waking up, so who knows -- someone might know of a better way to do this. In the meantime, search the forum. Google is also your friend :D
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
bradwww
Level 1
Level 1
Posts: 10
Joined: Sun Jun 13, 2010 7:11 pm

Re: how to use custom keyboard shortcuts

Post by bradwww »

I just tell Firefox or the website to remember my credentials when I log-in to a site.
yes but many sites don't let you save the login - like bank sites, and i use other applications like gmail and my database where i need to enter email addresses all the time, so the browser is not really a solution.
i also assign alternate keys to things like ctrl-z instead of ctrl-F4 close window for example.
please tell me how - i changed "close window" to ctrl-z and it does nothing - the old key still works. would a reboot be required?
Your example is just plain absurd. If you're just replacing 12 characters, or a word or two for that matter, why not just directly type the replacement? You're making it look harder than it really is.
you lost me there, how is typing 1 character to get 12 a bad deal? in my mind it's the best reason for ctrl and alt keys to exist. you are saying i should type for my health or will you help me get what i want so i can use the computer the way that is most comfortable for me? just because i want to use tools in windows does not mean they are absurd - when i introduced my friends to macro express they said it was the best windows tool since sliced bread.

do you have any suggestions on building a replacement utility? i don't think it would be very expensive. And can you assist me with this - perhaps it will help:

record playback: http://members.home.nl/wijnenjl/Record_ ... EN_01.html

thanks

brad
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1435
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: how to use custom keyboard shortcuts

Post by Pilosopong Tasyo »

please tell me how - i changed "close window" to ctrl-z and it does nothing - the old key still works. would a reboot be required?
Here ya go:
ctrl-z-to-close-window.png
You don't have to reboot the computer. It immediately takes effect. Be aware though that Ctrl+Z is a popular shortcut in many applications. It is used to undo a mistake.
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
bradwww
Level 1
Level 1
Posts: 10
Joined: Sun Jun 13, 2010 7:11 pm

Re: how to use custom keyboard shortcuts

Post by bradwww »

yea, i tried exactly that, did not work in chrome - when i use a keyboard macro replacement utility, it works across all applications, even if they use another key.

if anyone can help me find a way to get keys recorded and played back - let me know.
bradwww
Level 1
Level 1
Posts: 10
Joined: Sun Jun 13, 2010 7:11 pm

Re: how to use custom keyboard shortcuts

Post by bradwww »

are there any purchasable keyboard shortcut programs i can use in liniux mint?? thanks

brad
fernandocabral
Level 2
Level 2
Posts: 56
Joined: Wed Jun 04, 2014 6:15 am

Re: how to use custom keyboard shortcuts

Post by fernandocabral »

bradwww wrote:are there any purchasable keyboard shortcut programs i can use in liniux mint??
Brad, I think that in learning how to use a new software or a new operating system -- as in life -- we have to have an open mind to aprehend new possibilities. Linux is not Windows and many things are accomplished in different ways in one and the other system. Besides, some things are not even needed.

Now to answer your question more specifically, perhaps you want to take a look at AutoKey. It may give you most, if not all you expect data entry, macro programming, keyboard shortcuts, etc.

By the way, I still use AutoHotKey in Windows. It is very, very powerfull. You can accomplish same results with Autokey, but many things will be done differently.
So, take your time to understand its functionalities and how to make it work as you need.

I should also add that many many things can be accomplished more easily with other tools. For instance, I have more than 400 sites stored as firefox "Favourites" and it makes my life easier and I don't need macros. Of course, the 40 or 50 sites I access most are stored at "favourite bar" and I can access them with a single click.

But, this is not confortable enough, so I use LastPass, which automatically does one of the things you would like to do: automated login. Once I click the site I want to jump to, LastPass jumps in and does all the needed handshaking. Even in the case of complex login procedure, such is required by some banks.

Using Firexfox and LastPass (or other available options) has an additional advantage: you can keep several machines synchronized, even if some of the is running Lunix and others are running Windows, Mac or whatever.

So, for several of the things you mention, you don't even need to have a macro package. (By the way, there are several free software available that deliver the same things that LastPass delivers.)

Anyway, give AutoKey a try. Or Xmacroplay or Xnee.

And know that you can always resort to shell scripting (or any other of the several scripting language available). With scripting and piping, I can not imagine of any macro -- no matter how complex -- you can not create and use. With AutoKey, Python is your door to the universe. Almost anything is fair game.
Locked

Return to “Newbie Questions”