Vimperator :: exit insert mode in a textarea - vimperator

For some websites, which grab the focus to a textarea, it's not even possible to exit the "insert" mode in any other way except doing a mouse-click outside the textarea.
Is there any common workaround for this problem?

You can use Ctrl-[ to exit insert mode.

For those who cannot reach [ directly on the keyboard, I managed to map Ctrl-[ to Ctrl-#:
:imap <C-#> <C-[>

I use "b" in order to get the command line with buffers.
then i replace "buffers" with "q".

Related

In R, if I want to bring down the previous command without overwriting what I've already written, how can I do this?

I know that pressing the up arrow key brings down the previous command in R. In doing so, however, it overwrites anything that has already been typed on the command line. So for instance, if I want to define an object using a long command I've just executed, I have to press the up-arrow then either click or navigate via arrow keys all the way back to the beginning of the command to add in my object_name <- [command I've just brought down].
Is there anyway to bring down the previous command to wherever my cursor is, rather than having it overwrite the entire command line?
Thanks in advance for your help!

Changing the acceptance key (autosuggest-accept) - ZSH shell on mac

on > zsh mac terminal
if i type c and get the autocompletion suggestion as clear
To accept that suggestion i need to hit right arrow key and then press enter to run it.
I want to change the right arrow key to something else for example ` OR '
Plese help on finding a way to change this behaviour.
You can change bindkey for autosuggest-accept widget.
bindkey '`' autosuggest-accept
Note that this will disable your ability to type ` character directly though.
If you want to execute the autosuggest immediately after hitting `, change autosuggest-accept to autosuggest-execute.
To make this change permanent, add the bindkey line to your ~/.zshrc
If you also want to disable arrow key, you can remove the widget from ZSH_AUTOSUGGEST_ACCEPT_WIDGETS array.
ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=("${(#)ZSH_AUTOSUGGEST_ACCEPT_WIDGETS:#forward-char}")
As a more out-of-the-box solution, I just found out here that you can use:
CTRL+E
instead of the right arrow, and it will accept the autosuggestion.
In the link they refer to it as "end-of-line in emacs mode", but I didn't configure anything of the sort, so I guess it just works.

How to use the Edit/add new keyboard shortcuts in Jupyter

I am in the Edit Command mode Shortcuts dialog and things seem reasonable ..
But the actual behavior is a different story
When using the Option modifier (plus a non-modifier key) it just ends up printing a high-ascii character value in the add shortcut area .. and then when I refresh the page it has gone away.
I can not get Command modifier (plus a non-modifier key) to work at all. It is jus ignored.
The Control modifier (plus any key) is completely ignored.
So there is a basic usability misunderstanding here. Advice appreciated.
I added 'Ctrl-Q' as a shortcut to restart kernel and run all the cells. You can see the picture below. It is working fine. In the 'Ctrl-Q', 'Q' was just lowercase and it ran successfully.

how do you make something happen if a button is pressed in applescript

I am trying to make an app in applescript where if you try to turn the volume down the volume is set to 16. I am still a beginner and i was wondering if there is a 'if buttonpress' sort of command. Thanks!
Assuming I'm understanding you, this is the basic idea:
set button_returned to button returned of (display dialog "hi")
if button_returned is "OK" then
#do something
end if
You put up a dialog, then check for the name of the button clicked, and if the name matches whichever button you're checking for, then "do something".

Download file from firefox using autoit

I try to download file using Autoit from Firefox 28.0.
I try to download a exe file,popup flashed but autoit window info tool cannot recognize the save button.
how can i automate this.
My scripts looks like
Local $hWnd=WinActivate("[CLASS:MozillaDialogClass]")
WinWaitActive($hWnd)
;MsgBox(1,$hWnd,$hWnd)
;ControlClick($hWnd,"","Save")
ControlClick($hWnd,"&Save File","")
;WinClose("[CLASS:MozillaDialogClass]")
how can i automate this......
Right now both of your ControlClick attempts are incorrect. The correct syntax is ControlClick(Window title or handle, *window* text, control *id*, ...). Look at the helpfile and examples for it to see what you're not doing right currently.
The firefox download dialog is a little tricky, googling gives a lot of results for people who have tried to do the same thing and struggled.
The easiest method is to click the window at the coordinates of the button. ControlClick can be used for this (simply leave the control id blank). The AutoIt window info tool should give ControlClick coords when you try and select where the button is.
That method does assume that the button is always in the same place, which is not necessarily the case. Alternatives are to use ControlSend to send the Alt+S combination (or whatever it is for that button).
And finally, it's worth mentioning the IUIAutomation framework which has shown to be very reliable for automating windows that aren't using standard winapi controls.
The simplest way to do is as follows on mozilla:
Use the following code on autoit.au3 file
ControlFocus ( "MozillaDialogClass", "", "" )
Sleep(10)
Send("{ENTER}")
Execute the same file in selenium using:
Runtime.getRuntime().exec("C:\\Users\\Balaji\\Desktop\\autoit.exe");
Use the below code to download a file in Firefox using AutoIt.
WinWait("[TITLE:Opening ; CLASS:MozillaDialogClass]","", 10)
If WinExists("[TITLE:Opening ; CLASS:MozillaDialogClass]") Then
; Perform keyboard ALT key + s key to select Save File Radio button using keyboard shortcut.
ControlFocus ( "[TITLE:Opening ; CLASS:MozillaDialogClass]","", "" )
Send("!s")
; Wait for 2 seconds
Sleep(2000)
; Press Keyboard ENTER button.
Send("{ENTER}")
EndIf

Resources