Finally, I found a solution.
I create a python script using pynput LIB, running on python3.
from pynput import keyboard
from pynput.keyboard import Key, Controller
keyb = Controller()
is_alt_pressed = False
is_shift_pressed = False
is_down_pressed = False
def on_press(key):
global is_alt_pressed
global is_shift_pressed
global is_down_pressed
if key == Key.shift_l:
is_shift_pressed = True;
if key == Key.alt_l:
is_alt_pressed = True;
if(is_shift_pressed and is_alt_pressed and (key == Key.up)):
keyb.press(Key.down)
is_down_pressed = True
def on_release(key):
global is_alt_pressed
global is_shift_pressed
global is_down_pressed
if(is_down_pressed):
is_down_pressed = False
keyb.release(Key.down)
if key == Key.shift_l:
is_shift_pressed = False;
if key == Key.alt_l:
is_alt_pressed = False;
# Collect events until released
print("Keyboard macros running...")
with keyboard.Listener(
on_press=on_press,
on_release=on_release) as listener:
listener.join()
And allow all permission to bash shell (Terminal)