You are not logged in.
Pages: 1
Hello,
I have a nice laptop - Asus G14.
The only issue is that if doesn't have a dedicated keys : Home, End, PgUp, PgDn.
I was trying to create the new hotkeys for this buttons by "Fn+Up", "Fn+Dn"... or at least by "Alt+Up", "Alt+Dn"..
I was trying to use both gnome settings tool and xbindkeys, and I have faced the same issue - I need to write the "command" that will be executed by the hotkey. And I don't know what are those commands.
I couldn't find the solution online as probably everyone has those 4 keys.
There was a solution for Windows (using autohotkey) however there the simple commands were "End", "Home", "PgUp" and "PgDn".
If anybody knows the correct setup for xbindkeys or any other solution that would be great.
Any help/guidance would be appreciated.
P.S. This is my .xbindkeysrc
###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.3
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier (on my keyboard):
# Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# Another way to specifie a key is to use 'xev' and set the
# keycode with c:nnn or the modifier with m:nnn where nnn is
# the keycode or the state returned by xev
#
# This file is created by xbindkey_config
# The structure is :
# # Remark
# "command"
# m:xxx + c:xxx
# Shift+...
"xbindkeys_show"
control+shift + q
#alt-up
"xvkbd -xsendevent -text "\[Prior]""
m:0x8 + c:111
Alt + Up
#alt-down
"xvkbd -xsendevent -text "\[Next]""
m:0x8 + c:116
Alt + Down
#Fn-left
"xvkbd -xsendevent -text "\[Prior]""
m:0x0 + c:157
XF86Launch2
#Fn-Right
"xvkbd -xsendevent -text "\[End]""
m:0x0 + c:210
XF86Launch3
# End of xbindkeys configurationLast edited by Cashey (2021-03-02 18:29:46)
Offline
You can use xdotool:
xdotool key Page_Down
xdotool key Page_Up
xdotool key Home
xdotool key EndLast edited by seth (2021-03-02 21:41:42)
Online
Thank you seth.
Now I were able to set "Fn+Left" as "Home" and "Fn+Right" as "End"...
Unfortunately, none of the other combinations aka "Fn+Up/Down" or "Alt+Left/Right/Up/Down" works, as they probably already have some shortcuts assigned to them and I just cannot overwrite them.
Offline
What output do the failing shortcuts produce on "xev -event keyboard"?
Online
For Fn+Up/Down doesn't return anything at all. (however the laptop response for this combination by changing the keyboard backlight)
Fot Alt + Up/Down/Left/Right the response was following:
Outer window is 0x1800001, inner window is 0x1800002
KeymapNotify event, serial 24, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyPress event, serial 25, synthetic NO, window 0x1800001,
root 0x236, subw 0x0, time 53895083, (303,223), root:(333,310),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
MappingNotify event, serial 28, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyPress event, serial 28, synthetic NO, window 0x1800001,
root 0x236, subw 0x0, time 53895233, (303,223), root:(333,310),
state 0x8, keycode 112 (keysym 0xff55, Prior), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x1800001,
root 0x236, subw 0x0, time 53895240, (303,223), root:(333,310),
state 0x8, keycode 112 (keysym 0xff55, Prior), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
MappingNotify event, serial 29, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
MappingNotify event, serial 30, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyPress event, serial 30, synthetic NO, window 0x1800001,
root 0x236, subw 0x0, time 53896776, (303,223), root:(333,310),
state 0x8, keycode 117 (keysym 0xff56, Next), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x1800001,
root 0x236, subw 0x0, time 53896783, (303,223), root:(333,310),
state 0x8, keycode 117 (keysym 0xff56, Next), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
MappingNotify event, serial 31, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyRelease event, serial 32, synthetic NO, window 0x1800001,
root 0x236, subw 0x0, time 53896989, (303,223), root:(333,310),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeymapNotify event, serial 32, synthetic NO, window 0x0,
keys: 54 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ClientMessage event, serial 32, synthetic YES, window 0x1800001,
message_type 0xff (WM_PROTOCOLS), format 32, message 0xfd (WM_DELETE_WINDOW)
Offline
The Fn key is mostly a keyboard internal thing, it's not surprising that it doesn't work as a modifier.
ALt+Left/Right show the pattern of a global shortcut and Up/Down do NOT produce Up/Down, but Prior/Next - which are different keys.
This might be a feature of the keyboard/layout to map Alt+up/down to Prior/Next or up/down generally produce prior/next (which would be weird), but if you want to bind those to Page_Down/Page_Up, you'll have to bind Alt+Prior/Next …
Edit: check "xev -event keyboard" for the unmodified up/down key (ie. w/o pressing alt)
Last edited by seth (2021-03-05 15:04:21)
Online
Pages: 1