You are not logged in.
In windows there is an app called lenovo vantage, that had an option to switch between the use of function keys and special keys, whithin the app without going back to the bios.
what is want to do is a shortcut that toggles the two function, smth like this:
fn + fnN = special key
fn + fnN = FunctionkeyN
cause i have times when i need to use the function keys alot and there is times that special keys are more usable
and Thx.
Last edited by longshot (2024-04-28 15:01:56)
~ A penguin geek who wants to know every file in sysfs
Offline
It sounds like you have a Lenovo, you may be able to press the fn key while holding the escape key to, in a similar way as caps lock, make the fn key lock on or off as a toggle.
On most keyboards the fn key doesn't send a signal to the OS, its a modifier key the logic of which applies within the keyboard.
At least that's what I've read.
Desktop: Ryzen 7 1800X | AMD 7800XT | KDE Plasma
MacbookPro-2012 | MATE
Offline
yes exactly, sorry for not providing this info before
i use
81Y3 IdeaPad L3 15IML05
Kernel: 6.7.4-arch1-1
i have turned off sxhkd and run xev to see what does fn+esc register and it registers Escape and trying to press e.g. F1 key it registers as :XF86AudioMute
so i guess this isn't valid on my model, i have read on their website that this is only for products branded under think.
is there anyway else to simulate this fn lock key that i don't have?
~ A penguin geek who wants to know every file in sysfs
Offline
The brute-force method would be to xmodmap the symbols around, ie. eg.
keycode 121 = F1
keycode 67 = XF86AudioMute
You can use "xev -event keyboard" to figure the keycodes and then have a script that checks "xmodmap -pk | awk '/\(F1\)/{print $1}'" for the active mapping and flips it around.
Edit: if you're lucky the fn lock is exposed via the ideapad-laptop sysfs, https://github.com/torvalds/linux/blob/ … pad-laptop
Last edited by seth (2024-02-12 23:54:06)
Offline
I didn't like the brute force method, but I'll use it if there isn't any other option. Thanks
But I'm more interested in what u said later, what is sysfs?
Last edited by longshot (2024-02-13 22:36:08)
~ A penguin geek who wants to know every file in sysfs
Offline
... what is sysfs?
That's your follow-up question? Is google broken?
What's the output, on your system, of:
ls /sys/bus/platform/devices/VPC2004:*/fn_lock
Last edited by Trilby (2024-02-13 22:38:55)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Did you check the link I posted?
ls /sys/bus/platform/devices/VPC2004:*/fn_lock /sys/bus/pci/devices/*/PNP*/VPC2004:*/fn_lock
Offline
Oh sry didn't understand that at first, THANKS ALOT, I've found the file and switching between 1 and 0 changes it state. just wanna ask what is the best way to write to /sys files
i used
echo -n '1' | doas tee /sys/....../fn_lock
is there a better way?
~ A penguin geek who wants to know every file in sysfs
Offline
No. You can skip the "-n" but will have to invoke a sub-process to write a root, tee is a common pattern.
You can add your findings here:
https://wiki.archlinux.org/title/Laptop … Pad_series
And please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Done, thx bro
~ A penguin geek who wants to know every file in sysfs
Offline