LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Replacement for Hotkeys (https://www.linuxquestions.org/questions/linux-newbie-8/replacement-for-hotkeys-4175610384/)

SimonWh 07-22-2017 03:58 AM

Replacement for Hotkeys
 
Hi,
I am switching my wife to Linux, I have been using it for the last 3 months. Reasons are very simply we are both fed up with Windows updates!!
She uses hotkeys, that I have programed for her.
The sequence is ctrl Y gives [youtube][/youtube] she uses this very often, as you can see, it is a pain to type every time.
Is there a way to set this up in Linux? It is not important what the key sequence is to do it. It can be an F number or any other command.
Thanks all for your help
Simon

DavidMcCann 07-22-2017 11:33 AM

Yes indeed! You use the Super key: the one with the Windows logo. It depends on the desktop you're using, but there may be something in the menu for "keyboard shortcuts". If you have KDE, use the menu editor, select the program you want, right-click, and select "properties". If you have Gnome, Mate, or Cinnamon, then you need to run the configuration editor and define both a keybinding and a command. There's a lot of documentation about, or you can ask for more help.

For example, I have
Super-w for gnome-terminal -e "units"
Super-q for wine "/home/david/.wine/drive_c/Program Files/QemuLator/QemuLator.exe"

BW-userx 07-22-2017 12:11 PM

xfce4 and perhaps others as well but I am in xfce4 right now and am downloading so I cannot log out and into a different WM/DT to affirm this.

Code:

firefox www.youtube.com
in the keyboard shortcuts app they got then assign it to whatever keys one wants. the format should be similar for other means to apply KB short cuts.

AwesomeMachine 07-22-2017 03:10 PM

gnome-control-center allows to assign global keyboard shortcuts.

Jjanel 07-22-2017 08:46 PM

For CLI (maybe GUI too, Idk): bind (Readline & inputrc: learning FUN for me:cool: Thanks!:party:)

SimonWh 07-23-2017 02:11 AM

Hi,
Thanks for those replies.
I am using Cinammon 18.1, I am not sure I fully understood exactly what I should do, but I will look for some documentation
Thanks again
Simon

SimonWh 07-23-2017 06:31 AM

Hello Again,
I feel I have not fully explained what I am trying to do.
I am not looking to launch a program by the hotkey, I want some text to be applied when I click the hotkey.
It will be used within Mozilla
Thanks once again
Simon

DavidMcCann 07-23-2017 10:48 AM

Bookmarks? SpeedDial?
http://www.getspeedial.com/

SimonWh 07-23-2017 12:09 PM

Sorry,
She repeatedly has to type type the following command [youtube][/youtube] when posting, as you can see it is a bit difficult to type, so in Windows I just created a hotkey that when she pressed ctrl y it typed out the you tube thing.
I should have explained in more detail.
Thanks for your help
Simon

BW-userx 07-23-2017 01:13 PM

that little special web key is a hardware thing I do not think it will be useful anymore in Linux just like the "fn" on keyboards. They do not register in the system as a keyboard key because they are not.

you can google about the fn key and you will see all kinds of people asking why there fn key does not work. that special web key for windows I would bet is the same way. it is a 'hardware' key therefore, to set it up to get youtube with only one push of a key you can use a Function key which is do-able . if she does not want to use two keys or more to fire up a web browser and have it go straight to youtube.

How To Change The Linux Mint Cinnamon Keyboard Shortcuts
https://www.lifewire.com/how-to-chan...rtcuts-4064754

if it has an area to type the command just add what I showed in my other post. assign a key or two or three to it then save it. then test it.

Jjanel 07-24-2017 02:36 AM

Make Ubuntu Great Again
 
More positive toward Linux usability 'UI/UX', (very sorry that I don't 'do' GUI),
both/all are just 'machine code', so IF Win can, Linux can! (I think/HOPE!)

I tried searches like this: linux define hotkey browser "insert text"
&found autokey: https://www.howtogeek.com/howto/2691...x-application/ and https://askubuntu.com/questions/2806...redefined-text

I think I now understand that, in Firebox (like I click on LQ's quote/code/link etc.)
OP wants something like Ctrl+y (or other key, like F9 or 'Win'+y or most anything)
to insert: [youtube][/youtube] into the browser text window, in which they're typing.

Best wishes, for getting Linux to 'work for users'! ;) (Let us know the solution!)

JJJCR 07-24-2017 05:05 AM

This needs to open a terminal:
alias you='firefox http://www.youtube.com/'

So just type: you to open youtube (not tested not sure if it will work)

Or try xbindkeys
https://linux.die.net/man/1/xbindkeys

BW-userx 07-24-2017 08:25 AM

Quote:

Originally Posted by Jjanel (Post 5739158)
More positive toward Linux usability 'UI/UX', (very sorry that I don't 'do' GUI),
both/all are just 'machine code', so IF Win can, Linux can! (I think/HOPE!)

I tried searches like this: linux define hotkey browser "insert text"
&found autokey: https://www.howtogeek.com/howto/2691...x-application/ and https://askubuntu.com/questions/2806...redefined-text

I think I now understand that, in Firebox (like I click on LQ's quote/code/link etc.)
OP wants something like Ctrl+y (or other key, like F9 or 'Win'+y or most anything)
to insert: [youtube][/youtube] into the browser text window, in which they're typing.

Best wishes, for getting Linux to 'work for users'! ;) (Let us know the solution!)

I gave up looking -- maybe someone should e mail Linus Torvalds about it.

Jjanel 07-24-2017 01:02 PM

more clarification
 
To see what OP (apparently) means, do this:
in LQ's 'Reply' msg box, click on the icon for Quote
( [QUOTE][/QUOTE] gets inserted).

The question is: how to setup some 'keystroke' to do like this,
on other websites, like mail/blog/etc.

[youtube][/youtube] would be inserted, and user can then type/paste in between the tags
(like Ab1x99Z or whatever).

DavidMcCann 07-25-2017 11:07 AM

This seems to be the answer!
http://code.google.com/archive/p/autokey/

It is odd that this feature is not built-in. Thirty years ago with my Sinclair QL I could just enter the shell command altkey 'a','whatever'.

SimonWh 07-26-2017 06:13 AM

Hi All,
It is exactly this programme that I was looking for. It is very useful for anyone that has to type repeat actionsAgain thanks to all of you for your help
Simon

Jjanel 07-27-2017 01:05 AM

Cool! I knew Linux could do 'it', no matter what 'it' is ;)

Could you use the ThreadTools at top of page, to mark this as '[SOLVED]'
since this looks like something that will be useful to future searchers. Thanks!


All times are GMT -5. The time now is 01:36 PM.