Questions tagged [alt-key]
40 questions
2
votes
4 answers
Focus on first jmenubar item on "alt" key press
Is there any way to auto-select a jmenu within my jmenubar when the user's pressing the "ALT" key ? (Like windows softwares)
The problem is that the default behavior of my jframe, when the "ALT" key is pressed, is to show up a menu containing the…

Jsncrdnl
- 3,005
- 5
- 28
- 43
2
votes
1 answer
How to handle alt+p keyboardEvent on macOS browsers
I'ld like to listen the following keyboardEvent : alt + p
if (event.altKey && event.key === "p") {
doThis(stuff)
}
Problem is that in OSX (alt+p) === "π"
so I wrote this ugly condition for Mac OSX users
if (
(event.altKey && event.key…

Arielo
- 31
- 5
2
votes
0 answers
How do you prevent Alt key from shifting focus to the MenuStrip?
I'm trying to add my own functionality for Alt-key shortcuts.
I have a MDIContainer form, and I programatically add new forms (each with just a RichTextBox) as child forms at runtime. I then add custom handlers to the newly generated…

RapierMother
- 339
- 1
- 3
- 13
2
votes
3 answers
WPF: When Alt key is pressed, my ContextMenu won't open
In my WPF app, when a ContextMenu is opening, I want to tweak its menu items depending on whether or not the Alt key is pressed.
I've got the logic working. XAML:
Code:
private void…

Ross
- 4,460
- 2
- 32
- 59
1
vote
0 answers
How to access Menu bar (File, Edit, View etc.) in Sublime-Text-3 from keyboard in Ubuntu 18.04?
I am using Sublime Text 3 in Ubuntu 18.04. Actually, I hided the Menu bar of Sublime Text 3. Now I want to use Menu bar. But I cannot access the Menu bar from using ALT key.
I have also tried re-installing that. But it didn't work.

Bhuvan Gandhi
- 167
- 4
- 10
1
vote
0 answers
Firemonkey working with Alt + Char
My goal is to hook the Alt key and while it is down, process the next char pressed as a shortcut key, the way the Ctl key works in a TMenuItem.
I tried the FormKeyUp event but it never returns ssAlt in the Shift parameter.
How can I accomplish this?…

user2383818
- 709
- 1
- 8
- 19
1
vote
0 answers
Alt key command in Intellij for Windows
I've mapped some functions in IntelliJ IDEA to the Alt key.
Specifically Alt+W for closing an active tab.
When I mapped the key, it said that there were no conflicts with existing key binds, but whenever I try Alt+W to close an active tab, the…

lassebenninga
- 31
- 1
- 4
1
vote
1 answer
How can I detect whether the alt/option key is down in GTK on Mac OS X?
I want to detect whether the alt/option key is pressed during a mouse drag in GTK on Mac OS X. I am using pygtk. Normally, holding down alt would add MOD1_MASK to event.state, but alt does affect event.state at all. In key press events alt shows…

Geoffrey Irving
- 6,483
- 4
- 32
- 40
1
vote
1 answer
AHK recursive map? (Map RAlt to RWin which is mapped to other keys)
I have a bunch of RWin+X => Y mappings. I would like RAlt to be mapped to RWin so that RWin+X == RAlt+X. For example:
; RWin+J => Left
>#j::SendInput,{LEFT}
Which works fine, I can hold down RWin and press j and it would keep sending Left. Now…

vexe
- 5,433
- 12
- 52
- 81
1
vote
3 answers
SelectOneMenu resets and fires change event on ALT press
Using PF 5.1, JSF 2.2.7 on Glassfish 4.1.
I have this simple example with a selectOneMenu:

Jaqen H'ghar
- 4,305
- 2
- 14
- 26
1
vote
1 answer
detecting altKey on MacOS in zoomchart
I'm implementing functionality to create a link between two nodes on Shift+Alt+Click. Like this
function graphSelectionChange(event){
var selection = event.selection;
if (selection.length === 2 && event.altKey){
var fromitem=selection[0];
…

Graphileon
- 5,275
- 3
- 17
- 31
1
vote
2 answers
Capturing Alt+PrintScreen hot key and clipboard contents
I setup catching hotkey on alt+printscreen. It catches perfectly but there is nothing in the buffer - no image. How can I get the image from Clipboard.GetImage() after catching hotkey?
Here is the the code.
using System;
using…

kusanagi
- 14,296
- 20
- 86
- 111
1
vote
1 answer
Determine wether the middle mouse button is pressed but not the alt key
I experimented with java.awt.event.MouseEvent and mouse buttons and modifier keys. Finally I came to a point, where I was confused by its behavior.
Normally I use SwingUtilities.isLeftMouseButton(...) etc. to detect, which mouse button is pressed…

Michael Dietrich
- 451
- 1
- 5
- 17
0
votes
1 answer
send alt-g to chrome window to open a goto dialogue in tradingview
I am trying to open a tradingview url and then invoking a goto date. alt-g. i found this thread which i thought might work. Handle the KeyDown Event when ALT+KEY is Pressed. this has the following code below. (i added SendAltKey by looking at…

SeanK
- 15
- 1
- 3
0
votes
0 answers
Left alt and right alt produce different results
My script:
#MenuMaskKey vkFF
#SingleInstance Force
SendMode Input
SetTitleMatchMode Regex
#IfWinActive ahk_exe (chrome|msedge).exe
!l::Send ^{Tab}
#IfWinActive
In Chrome, when using !l with the left alt, ctrl+tab is sent without side effects,…

Wenfang Du
- 8,804
- 9
- 59
- 90