0

I was looking for a way to disable the alt functionality that prepares a mnemonic-capable menu to be used with the keyboard, waiting for a letter to be pressed but, apparently, this isn't possible by Windows itself, at least not Windows 7 (I don't know others).

The issue is just with Adobe Premiere in which the alt is used, among other things, to zoom in and out the timeline/sequence and I do this a lot because I do frame-by-frame lip-sync.

Thing is that when I release the alt key, sometimes, its menu-related functionality remains and an immediate use of the arrow keys to move the... cursor? in the timeline/sequence instead of navigating through the video frames, I navigate through the menus.

Although frustrating, by pressing alt again immediately after stop scrolling up/down the mouse wheel, I can keep a continuous working flow. It's just for a millisecond, but just extrapolate this to a very time-consuming task in which 2-3 minutes may take 2-3 hours to finish.

Anyway... While searching for an alternative approach I've found someone with the same problem but with Adobe Photoshop and someone else suggested both an app called apssistant that sadly it is only for Photoshop, but also a solution with AutoHotKey.

I always tried to avoid AHK because I never liked programs running in the background and, in this particular case, every bit of memory and/or processing power is vital, considering I don't have top hardware configuration. Last time my PC stopped worked several times because of the complexity of the project with Premiere consuming more than 7GB of RAM.

But I gave it a shot combining the original suggestion:

#NoEnv
; #Warn  ;
~LAlt::
KeyWait, LAlt
return

~LAlt Up::
Send, {LAlt Up}
return

I'm positive that this works because I tested in a Windows Explorer window and, although the menu blinks, it doesn't fire.

with a way to trigger Premiere -AND- run the script altogether:

#NoEnv
; #Warn  ;#Persistent   ;Script will not Exit when no hotkeys exist.

Run, "C:\Program Files\Adobe\Adobe Premiere Pro CC 2017\Adobe Premiere Pro.exe"

SetTitleMatchMode, 2   ;Program Title can be portions of the title instead of the full title
SetTimer, CheckPrograms, 1000   ;Run CheckPrograms subroutine every 1 second
return

CheckPrograms:
IfWinExist, Premiere
{
    Run, DisableALTFunctionality.ahk
    ;PremiereTrack = 1
}
IfWinNotExist, Premiere
    ;PremiereTrack = 0
    Exitapp
return

But as far as I could tell, this didn't work because when Premiere finally loaded (no SSD here yet) I opened my last project and the ALT functionality was still in place.

I'm running the second script through a shortcut in my Desktop, both scripts are in the same directory and AHK files are correctly configured to run with AutoHotScript x64 manually (portable version) — the tray icon shows that the script running is indeed DisableALTFunctionality.ahk.

But even increasing the timeout to something like 5 minutes, I didn't have any success.

  • your question will be downvoted - it's vague and contains a lot of irrelevant info. If you want help I'd suggest you do this: run only this AHK script (it's just 1 line): ~LAlt::return and test how it affects applications and your Premiere functionality. Describe exactly what works or not. Then try run only this AHK script: ~LAlt up::return and describe again what happens. And don't run multiple scripts at the same time. please keep question short and precise as possible – Mikhail V Jul 31 '18 at 15:31
1

You can use the #If- or the #IfWinActive- directive to disable the ALT Functionality in this program:

#NoEnv
; #Warn  ;#Persistent  ; Script will not Exit when no hotkeys exist.

SetTitleMatchMode, 2   ; Program Title can be portions of the title instead of the full

#IfWinActive, Premiere

    LAlt::
    RAlt:: return     ; do nothing

    !WheelDown:: Send, {Alt Down}{WheelDown}{Alt Up}    ; ! means Alt

    !WheelUp:: Send, {Alt Down}{WheelUp}{Alt Up}


#IfWinActive          ; turn off context sensitivity

Try also:

#NoEnv
; #Warn  ;#Persistent  ; Script will not Exit when no hotkeys exist.

SetTitleMatchMode, 2   ; Program Title can be portions of the title instead of the full

#IfWinActive, Premiere

    LAlt up::
    If (A_PriorKey = "LAlt") ;  If LAlt was pressed alone
        return ; do nothing
    return

    ; In this case its necessary to define a custom combination by using "LAlt &" or "<!" 
    ; to avoid that LAlt loses its original function as a modifier key:
    <!F4:: Send {Alt Down}{F4}{Alt Up} ; <! means LAlt


#IfWinActive          ; turn off context sensitivity
  • this will disable Alt completely though. seems OP still need it for the functionality it conflicts with. – Mikhail V Jul 31 '18 at 16:01
  • Yes. And in fact I haven't even considered that when I was writing the script because it should abort short pressings. The combo I use most is: hold ALT and mouse wheel. Is there a way to distinguish them? – Bruno Augusto Jul 31 '18 at 18:50
  • Try my edited answer. – user3419297 Jul 31 '18 at 19:29
  • The first code does block the ALT key, but holding ALT and then scrolling up/down does nothing, like if there was no ALT pressed whatsoever, which in Premiere just controls the seek bar, instead of zooming in/out . Besides that, it blocks other "normal" ALT combinations like ALT+TAB (>.<) too. Would you mind explain the second code? Because the "mnemonic trigger" is still there and they work if I press their associated keys, however, I tried to replicate the workflow of a real use case (I'm on a day-off today) and the menu didn't open by accident. – Bruno Augusto Jul 31 '18 at 20:09
  • The second code disables the left ALT funktionality only if the left ALT key was pressed alone (it doesn't prepare any menu to be used with the keyboard). All other ALT + Key combinations remain intact. – user3419297 Jul 31 '18 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.