set up a shortcut / keybinding under GNU/Linux with altGr key (but Autokey nor other methods reconize the key) - keyboard-shortcuts

I need to do a simple shortcut and this problem is driving me crazy.
Whenever I press AltGR+Backspace I would like to simulate a CTRL+LEFT(arrow).
The thing is that AutoKey doesn't get the AltGR input (and neither xbindkeys or other methods).
I tried to do it with xbindkeys but AltGr is seen as a "Mod5 + ISO_Level3_Shift" input and despite that I can't figure out how to do it, this doesn't work:
"xte 'keydown Control_L' 'keydown Left' 'keyup Control_L'"
m:0x80 + c:22
Mod5 + BackSpace
Thanks in advance for any help!

I find a solution with xbindkeys, I needed to insert "+ Release" after the combination of keys, so:
"xte 'keydown Control_L' 'key Left' 'keyup Control_L'"
Mod5 + BackSpace + Release

Related

How to trigger an action if there's only one key being pressed?

Here's my current script:
Shift::Send ^{Space}
It doesn't only trigger ^{Space} on pressing Shift alone, it also triggers on Alt+Shift (just these two keys) and Ctrl+Shift (just these two keys) if Shift is the last released, is there a way to trigger ^{Space} if Shift is the only key being pressed?
AutoHotkey Version: 1.1.33.09.
I have your answer and to think I only learned this today.
~Shift::return
#If, A_PriorHotkey = "~Shift"
Shift Up::
SendEvent, ^{space}
#If
return
Worked for me. The ' ~ ' symbol will let you still type capitals although it will still send the ^{space} still. Either delete it (it still works) and/or You will have to make this script Context-sensitive right?
P.s.
I learned it from another code and just adapted it to my and your needs. I needed almost the same thing as you today :-)
Here is the old code I found which I adapted
^k::return
#If, A_PriorHotkey = "^k"
^a::ToolTip, % A_ThisHotkey " pressed with ^k"
^b::ToolTip, % A_ThisHotkey " pressed with ^k"
^c::ToolTip, % A_ThisHotkey " pressed with ^k"
^d::ToolTip, % A_ThisHotkey " pressed with ^k"
^k up::SendInput, ^k
#If
This works for me.
~Shift::return
#If, A_PriorHotkey = "~Shift"
Shift Up::SendEvent, foo
!*c::SendEvent, foo
#If
return
try this:
Shift::
SendEvent, foo
return
Ctrl & Shift::return
Alt & Shift::return
This doesn't work with Numpad keys though for some reason. And again, this script will have to be Context-sensitive.
Here's my working script:
~*Alt::
~*Ctrl::
~*Shift::return
Shift::SendEvent ^{Space}
Yup Simple, Put the '~ Tilda' key next to it.
~Shift::
SendEvent, ^{Space}
return

Switch panes in Atom without cmd/ctrl + k?

I'd like to be able to switch between my Atom panes anytime without having to press CMD + K first before being able to switch via CMD + Up/Down/Left/Right.
Is this somehow possible?
I added this to the keymap but it doesn't work:
'atom-workspace':
'cmd-up': 'window:focus-pane-above'
'cmd-down': 'window:focus-pane-below'
'cmd-left': 'window:focus-pane-on-left'
'cmd-right': 'window:focus-pane-on-right'
This looks old, but incase anyone else stumbles on this - using the .editor context works for me:
'.editor':
'ctrl-alt-cmd-shift-right': 'window:focus-pane-on-right'
'ctrl-alt-cmd-shift-left': 'window:focus-pane-on-left'
'ctrl-alt-cmd-shift-up': 'window:focus-pane-above'
'ctrl-alt-cmd-shift-down': 'window:focus-pane-below'
Also, I wonder if using cmd-left/right would also cause an issue - on OSX cmd + left/right is a default OS shortcut for HOME / END (beginning / end of line), that might also cause a conflict.
'body':
'ctrl-right': 'window:focus-pane-on-right'
'ctrl-left': 'window:focus-pane-on-left'
This worked for left/right. I'm still trying to figure up and down tho
Check out the paner package! You can implement the usual-vim ctrl-w h etc. to move around panes by installing this and setting up the keymap. The documentation page has example keymaps.
Now if only they'd put a control key on both sides of the MacBook...
I ended up with:
'body':
'ctrl-alt left': 'window:focus-pane-on-left'
'ctrl-alt right': 'window:focus-pane-on-right'
'ctrl-alt up': 'window:focus-pane-above'
'ctrl-alt down': 'window:focus-pane-below'
press ctrl+alt, release, then hit your direction.

Is there a keyboard shortcut to select a column for editing in Atom editor?

Scenario
When editing a file in Atom Editor how do I select multiple lines where the same edit needs to be performed?
For example:
this.name = name;
this.age = age;
this.sound = sound;
needs to be transformed into:
that.name = name;
that.age = age;
that.sound = sound;
Imagine there are many of these lines, but we do not want to use a find-and-replace because it will change more than we need.
Question - Is there a Keyboard Shortcut for Column Selection?
Is there a sequence of keyboard shortcuts (preferably Mac) which we can use to:
a) select the initial word
b) select the "column" (that word on several lines)
then apply the change to several lines at once (in bulk)
I know how to do this in SublimeText:
http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/editing/editing.html#column-selection but have tried many different key combinations without any luck in Atom and googling has proved fruitless...
There are several ways to achieve this:
Keyboard
You can enable column selection mode using Ctrl+Shift+↑/↓. This will allow you to extend the cursor to multiple rows. Once you have selected all rows, release the keys, and use the Delete key to remove the text you want to replace. Once you're done, press the Esc key to release the cursors.
Note: You will have to disable the Mission Control (key bindings) in OS X to use this key combo.
How to Disable Mission Control (conflicting) Key Bindings (Mac)
To do this open System Preferences > Mission Control
Locate the key bindings for Mission Control and Applications windows:
Disable the key bindings for these two:
More details here.
Mouse
If you install the Sublime Style Column Selection package, you can use Alt+Mouse to select the columns in question.
More details here.
Here is a plugin for Atom, just hold alt and be happy.
sublime-style-column-selection
With the cursor somewhere on the first "this", do Ctrl+D (OS X: command+D) three times. Then type "that".
Another option is to select the rows you want to edit. Then select "Split into Lines" from the "selection" menu. Then hit the home-key and start editing away in multi-cursor mode.
For me on Atom 1.7.4 it worked by adding below lines to my /Users/username/.atom/keymap.cson. Ofcourse I am using alt-shift-down as shortcuts.
'atom-workspace atom-text-editor:not([mini])':
'alt-shift-down': 'editor:add-selection-below'
Update: I could not configure both alt+shift+down and alt+shift+up at the same time. For now I am okay with alt+shift+down
On Windows 10, follow the following steps:
Press ctrl + alt together and use up/down arrow keys to expand the height of your now vertical cursor
Now use shift to select the columns to be deleted
press delete key to remove selected columns
click anywhere on document (without pressing ctrl/alt keys) to bring cursor back to normal 1 column height
I came by this thread, and the feature I was personally looking for was the multi-cursor extension.
I've tried all of the following potential solutions:
sublime-style-column-selection
multi-cursor
multi-cursor-plus
Adding the following text to /Users/$(whoami)/.atom/leymap.cson
'atom-workspace atom-text-editor:not([mini])':
'alt-down': 'editor:add-selection-below'
'alt-up': 'editor:add-selection-above'
The last solution is the one that worked best without interfering with any of my other normal workflows.

Function keys In UFT

Version : Using HP-UFT Tool 11.53 Build 0382.
Question :Wanted to automate Function key F9 for my script but I am not able to as I do for normal keyboard keys what is method to do so.
Work Done : Try to Record for function key Hitting But no record is create for it.
Scenario : In my application on F9 press one popup would come and I just want to test it using UFT Tool.
You can use sendkeys, if you want to hit any key from keyboard. Try the below code.
Set oWscript = CreateObject("WScript.Shell")
oWscript.sendkeys"{F9}"
In UFT Window has a Type method, the parameter for this method is a string but there are special values for special keys. For you case you probably want micF9.
Please look and Window.Type's documentation for more details.

Simulate TAB keypress event in Selenium RC

I need to simulate a tab keypress in Selenium RC, using the Java API.
I do this after having entered some text using:
selenium.type(input, "mytext");
I've tried 3 alternatives to get the tab working:
selenium.keyPress(input, "\\9");
and:
selenium.focus(input);
selenium.keyPressNative("09");
and even:
selenium.getEval("var evt = window.document.createEvent('KeyboardEvent');evt.initKeyEvent ('keypress', true, true, window,0, 0, 0, 0,0, 9,0);window.document.getElementsByTagName('input')[2].dispatchEvent(evt);")
The best I can get is a "tab space" to be inserted after my text so I end up with this in the input field:
"mytext "
What I actually want is to tab to the next control. Any clues? Thanks!
(Note: I have to use tab and can not use focus or select to chose the element I want to go to, for various reasons, so no suggestions along these lines please!)
selenium.keyPressNative(java.awt.event.KeyEvent.VK_TAB + "");
I don't use the Java API, but this post from google groups suggests it is your solution. I can't imagine that "9" is different from "09" in your question, but give it a try?
Try the official TAB char: \t or \u0009
Some functions may used Onblur. It will trigger the function when the field lose the key focus. here we can use fireEvent with "blur" or "focus" command as follows:
command: fireEvent
target: id=your_field_identification
value: blur
Reference: http://qaselenium.blogspot.com/2011/01/how-to-triger-tab-key-in-selenium.html
Improvising Ryley's answer, we can use
selenium.keyDownNative(java.awt.event.KeyEvent.VK_TAB + "");
selenium.keyUpNative(java.awt.event.KeyEvent.VK_TAB + "");
I tried this method for VK_CONTROL in IE and it worked good.
Use typeKeys():
Quoting the above link:
Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field.
In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.