Using "xbindkeys" and "xdotool" to set fullscreen on firefox 60.1.0esr - centos

My intention is to know if there is a way to set firefox-60.1.0 in fullscreen mode once it is opened to act as a kiosk, but using the Xbindkeys and Xdotool programs.
Note: I've already performed some tests, that's why I changed a little bit the scope of the original question.
XBindKeys uses a configuration file .xbindkeysrc for binding keys.
For example, I edited this file to set firefox in fullscreen mode by pressing shift + f keys combination. Then, this action activates the xdotool command to send the F11 key to the browser only if firefox is already opened:
# set firefox to fullscreen if opened
"xdotool search --classname navigator key F11"
shift + f
The problem is that it only works on firefox 52.8.0esr but my target is firefox 60.1.0esr and later versions.
So now, I´m wondering 2 things:
Will "xbindkeys" and "xdotool" programs be compatible with firefox-60.1.0 and later versions?.
Are there any Xclients replacement that are compatible with firefox-60.1.0 and later versions?.
Some other Xclients I have found are (but not tested so far):
xvkbd
xkb
xmodmap
..also other alternatives to xdotool such as autokey and more from these posts:
https://alternativeto.net/software/xdotool/?platform=linux
Note: I´m using centos for testing this.
Thanks for your help!
BR

So if I understand you, any keys are allowed before Firefox starts AND then only keys you want are allowed?
Use xbindkeys to start a shell script that:
remaps with xmodmap any keys you wish to surpress into something harmless
starts firefox as a background process
uses xdotool to send an F11 key to the firefox window
then waits for firefox to complete
and finally
uses xmodmap to restore the original keybindings.

Related

vs code consistent keybindings for Mac and windows with settings sync

I use a windows computer for work and have painstakingly set up many keybindings for common tasks, as well as many other personalizations I really would like to have transferred to my personal computer, which is a Mac.
I recently found out about and set up Settings Sync, which is pretty awesome, but I can't seem to get my keybindings to work quite how I would like.
First, it doesn't seem that any of my keybindings transferred--when I open up the keyboard shortcuts on Mac and display User Keybindings, the list is empty, yet when I do this on Windows, all my keybindings are there.
To complicate matters, I sometimes use a Windows keyboard with my Mac. Without getting into too much detail, I'll explain what I'm trying to accomplish with a particular shortcut:
On windows machine, I use the right alt and ctrl keys to open up my integrated terminal with:
alt+ctrl+t
I'd like to keep this keybinding to work even when on my Mac because when I use my windows keyboard with it, I still have the alt and ctrl keys on the right side of the keyboard.
However, on my Mac without the windows keyboard, in place of the alt and ctrl keys I have the cmd and option keys, so in this instance I'd like cmd+option+t to trigger the integrated terminal.
So, is my solution to simply recreate all my windows shortcuts that use alt+ctrl with a corresponding cmd+opt version for Mac? And what about all the missing user keybindings that didn't seem to transfer with settings sync (logs show that they should've been transferred)? If anyone has any advice about how to properly set this up, I'd greatly appreciate it. Thanks.
It seems that Settings Sync synchronizes the user’s shortcuts by platform, which would prevent conflicts between Windows and Mac. So to achieve what you’re looking for, it should be enough to properly configure your shortcuts as you want them to be now in Mac.
There shouldn’t be any conflict when you move to your Windows machine, each platform should keep its own configuration :)

How do programs like Emacs and Nano get user input while running in terminal without the user having to press enter?

Programs like Emacs and Nano can run in a terminal window and accept real time user input, how might I accomplish this myself? I am looking to use C++ but I can see this could require interfacing with the user's shell, in this case Bash. How can I take input (be it from the mouse or keyboard) from the terminal window without the user having to press enter?
My target platform is Mac OSX Version 10.13.5, but answers on how to do this on other platforms like Windows or Linux are also welcome.
These programs set the terminal to raw mode as opposed to cooked mode. Cooked mode is read a line at a time and is handled by the terminal driver, and raw mode is read a character at a time and is handled by the running program instead.
This Answer has more information.
This Repo is a simple project that implements this mode that you can learn from. man termios will also give you information about manipulating terminal modes.

M-x not working for 2 days in Emacs

I do use Emacs for years, and in particular the Cygwin Emacs version (under Windows 10) for months.
Since 2 days, M-x combo key is not working anymore, well ESC x but I don't want to be forced to use Emacs à la Vi ;-)
First, I thought that the keyboard of my laptop could have a trouble, but the same effect is observed with an external keyboard connected by USB.
Second, I though it could be due to some changes I did in my own Emacs init file, or changes inherited from MELPA. To test that, I came back into time with Git, but that wasn't it: problem still observed; to test for MELPA packages, I used a minimal Emacs (emacs -q) and, once again, the problem still persists.
(And ESC x displays that M-x, translated from <escape> x, runs the command
execute-extended-command -- which is expected.)
Finally, what's weird, is that the key x alone is working, and so does C-x. On the other hand, M (meta) is working: M-c, M-w do work like expected.
So, to sum up, only the particular combination M-x is not working, and I really have no idea why.
Any smart test I could do to debug this (on Win 10)?
To sum up the answer in the comments:
If your key combination does not do what you expect - use C-h k to find out if it's a wrong mapping inside emacs, or something is grabbing this combination before emacs has a chance. If C-h k doesn't do anything in response to Alt-X - then you can be certain emacs doesn't see it at all.
If you want to confirm a key combination has been hijacked try to use some other application with it. Alt-X isn't used by regular Windows applications, but if you happen to have anything else that can have customized key bindings then try to map Alt-X to anything inside it. Eclipse, IntelliJ, Visual Studio, gvim. But seeing what happens with C-h k is a sufficient proof.
To find out what is stealing your Alt-X check what was installed or reconfigured lately. Disable startup programs if you can't recall. Additionally, from my experience a couple of nasty offenders: Intel video driver, and Windows language bar. (Not with Alt-X, with other key combinations.) Windows language bar is especially annoying when it steals C-S-) which I use for slurp.
Last thing. If you are running in a VM, your key combination may be stolen at either host or guest level (or both, as I've seen with the language bar.) So you may need to look around in both places.
I encountered the same problem. But I found that the problem was come up with the conflict of hotkey. On my Win10 OS, M-w is conflicted with the Tencent QQ software. So when I closed the QQ or changed the QQ's hotkey, the Emacs worked well.
I don't know why, but the problem is with Growl for windows v2.0.8. Close it and emacs will run normally.
Anyways, any new program setup could create conflicts. Stop all new (since the bug) process and check it.
(I don't want to change the keys configuration)

Remap meta key to other key on the keyboard

I have a programmable mechanical keyboard and can place any key anywhere.
At our company we recently switched to windows PCs and so that broke my emacs configuration because of the dreaded windows key which I tried to map to Meta but never got it to work.
Basically I use tigervnc to run vnc session that runs on linux.
Running emacs under linux in the VNC on a windows machine is a pain.
Every time I click the windows button to act as a meta the windows menu popup.
Anyways, I wonder if I can map Meta key to say "insert key", and the program the keyboard to have "insert" in place of "windows key" and vice versa.
I am also using ALT for other configurations so I don't want to map meta to ALT since I sometimes use all three combinations "Ctrl+ALT+Meta"+F-keys.
Is there a way to do so?
It would help if you can tell us which keyboard you own.
If it supports QMK firmware, you can just create two layers of keymaps for regular Windows usage and for VNC.
I think you will need to peruse Keymaps for Translating Sequences of Events (function-key-map et al).

Shortcut key to restart server in Eclipse

So Ctrl/Cmd + F11 starts the server, but is there a key to restart the server? I'm developing using app engine and GWT if that makes any difference (I suspect not).
The approach of Nirmal Patel can be extended to restart the server while using only the keyboard.
Therefore define a shortcut to switch from the editor (or wherever you want) to the Servers View. Go to Window -> Preferences -> General -> Keys. Select 'Show Views (Servers)', choose for the 'When' attribute: 'In Windows' and use your prefered shortcut in the binding input field, for example Ctrl + Alt + R.
Hitting this shortcut twice now will restart the server. (First one will bring you to the Servers View, second is the default to restart the server while in Servers View.) With a macro program like AutoHotKey you can bring it down to one simple shortcut.
Example for AutoHotKey:
Create a script like discribed in the Tutorial containing just
^r::
Send ^!r^!r
Run the script (Rightclick on it -> Run Script) and if you defined the shortcut like mentioned above, you can now restart the server with a simple Ctrl + R. Pretty convenient. :)
While focused on the Servers view, you can press Ctrl + Alt + R to restart the server.
Not that I know of.
The only feature related to that shortcut dates from WTP2.0 and its interaction with Debug session:
Debug Last Launched
Have you ever used Run on Server, hit a bug in your application, and then hit F11 to test again, only to find out that it tries to start the server again instead?
This long standing and annoying bug has been fixed, so you can now use F11 (or Ctrl-F11 for debug) to rerun just the last html page or EJB.
For MAC users
Start the server - OPTION+COMMAND+R
Start the server in DEBUG mode - OPTION+COMMAND+D
Stop the server - OPTION+COMMAND+S