Keycodes of function keys with F-lock off? - windows

Many recent keyboard from Microsoft and Logitech have a so-called F-Lock key, which toggles the function keys F1 to F12 between their traditional keycodes and new meanings that are printed onto the keys: F1=Help F2=Undo F3=Redo F4=Open ... . (See also http://en.wikipedia.org/wiki/F-Lock.)
This means that long-established shortcuts such as Alt+F4 no longer work if the F-lock is off, and googling shows that quite a few people are unhappy about this.
So I'm wondering, what virtual key (VK) codes do the function keys send when F-lock is off? VK_F13 to VK_F24 perhaps? Or do they not trigger standard keyboard events at all?
(I haven't got such a keyboard to try and find out myself, and didn't manage to dig up anything on MSDN about this.)

This article says you can't detect F-lock programmatically
http://jtsang.mvps.org/flock.html

I was just trying to find this out so that I could make an application continue to work with F-Lock off and couldn't find a list so thought I'd post what I found. Rather than any new unique key-codes when F-Lock is off the following conventional key combinations are sent:
F1 = F1 (Help)
F2 = Ctrl+Z (Undo)
F3 = Ctrl+Y (Redo)
F4 = Ctrl+N (New)
F5 = Ctrl+O (Open)
F6 = Ctrl+F4 (Close)
F7 = Ctrl+R (Reply)
F8 = Ctrl+F (Fwd)
F9 = Ctrl+Enter (Send)
F10 = F7 (Spell)
F11 = Ctrl+S (Save)
F12 = Ctrl+P (Print)

Related

How to debug without the F buttons?

How to debug on a laptop that has different Function keys?
On a PC those buttons work, but on my laptop they don't because, for example the F9 key (which should run the program) locks the screen. The F6, F7 and F8 keys do other things, too, like locking the touchpad. I start the program with the mouse, clicking the button in the RAD Studio that says "Run", but then when it reaches the breakpoint I don't know how to start moving to the next line.
Edit: The FN button helped me. I use laptop Lenovo IdeaPad 3
Your Lenovo IdeaPad 3 has (like also Fujitsu's Lifebook) the additional key Fn on the lower left, which occurs for compact keyboard layouts (such as on laptops). Handle it like you would handle Ctrl or Shift or Alt: press and hold it down first, then the actual key you want to press.
In general multiple actions of a keyboard key are distinguished by their printed position:
bottom left: the default action - have a look at f.e. , or 8 or Home.
top left: when holding Shift - this also explains why all letters are printed in uppercase. See also how you'd press ? or > or :.
bottom right:
if you have: when holding Alt Gr - on f.e. German layouts by this you achieve pressing µ or € or ³. If you also have a Fn key then actions for for that are enclosed in a rectangle.
if no Alt Gr is available, it is meant for holding Fn (and then actions are not essentially in rectangles) - that's how you finally can press F9 and such, while the key's default action is device specific.
top right: almost only encountered outside latin alphabets, when whole input method menus need to be used.
See Wikipedia for different layout examples, including potential Fn positions.

Function keys F5 and F6 not working properly on macOs when using Keychron keyboard

I'm trying to use the refactoring rename shortcut on IntelliJ (Shift + F6). However, it doesn't work. I'm using macOS and a Keychron K8 keyboard. I noticed that F5 is not recognized either.
I just found the solution: pressing fn + K + C for 3s, the Keychron keyboard flashes 3 times, then the function of keys f5 and f6 will switch to the normal function on macOS.

My function/Fn key isn't working when you as a modifier key

I have a USB keyboard and the Fn key works but not when I use it with another key. For Example, F3 works to use the Find feature in my browser and just pressing Fn brings up the right-click menu on the desktop. but Fn + F3 to raise volume level (which is printed on my keyboard) doesn't work.
I suggest to update the driver.
also you can checking If the Function Keys are Locked or try Pressing the F11 or F12 Keys
What if function keys are not working on my computer?

How to catch F9 and F10 key presses in modal form

Visual FoxPro 9 modal form KeyPreview property is set to true
I tried in form keypress event
LPARAMETERS nKeyCode, nShiftAltCtrl
messagebox(nKeyCode)
but message box does not appear.
If up arrow or letter is pressed, message box appears.
How to catch F9 and F10 key presses ?
In the VFP IDE, F1, F2 and F10 have reserved behavior and can't seem to be overridden. However, if you compile the form as part of an application, it should work as expected.
EDIT: I tried that, but F10 still would just activate the menu on _SCREEN. F1 and F2 were detected, though.
As a test I made my test form a Top Level form and set SCREEN=OFF in my config.fpw. I then recompiled the program and finally F10 was detected in the KeyPress event.
So there is some kind of built-in behavior you have to work around. You may also see if ON KEY LABEL F10 can be of use.

how to work function keys without pressing the fn key while debugging

I am using dell inspiron 5000 series laptop. It was very hard to press the f10,f11 keys by pressing the fn key every time while debugging. Can you please give me the solution how can I be able to access directly the function keys without pressing fn key.
Although this is for a different version of Dell Laptop it took me ages to find the solution so thought I would share, as this post came up high on my google search.
On my laptop XPS 15 9550 I had to press the fn key and the f key for example to refresh a page was fn + F5. Annoying.. to rectify the problem I looked in the BIOS as explained on this post but the option did not exist.
SOLUTION
Instead I needed to press "Fn + Esc" this locks the function key. now pressing F5 refreshed the screen
Yes this is a Bios setting, but you can simply toggle between them using FN + ESC!
So in your case, hit FN+ESC once :)
"Fn" key is by default enabled in Dell laptops, you can disable Fn through BIOS setup. For this, reboot/restart you system and when DELL symbol shows, press F2 to enter into BIOS setup, select "POST Behaviour" ==> "Fn Lock Options". On the right side screen select "Lock Mode Disable/Standard". It will disbale the "Fn" key and it won't interrupt while debugging.
From the menu go to Tools -> Options -> Environment -> Keyboard. The right hand side will have a long list of commands (e.g. "Debug.StepOver") and fields for adding your own custom shortcuts.
Also I don't know about the Dell Inspiron but on my Surface Pro I can press Caps-Fn to keep it permanently on, so you might want to try that. I believe some laptops support it in the BIOS, so check there as well. Finally this link suggests that the Dell extensions to the Mobility Center allow you to change the behaviour there.
Firstly check whether your key board has "FnLock" key. It's usually with the "Esc" key. If you have ,great you don't need BIOS setup, follow the below steps-
Tap and hold the Fn key on your keyboard.
While holding the Fn key, tap the Fn lock key(Esc key) and then release both keys.
Done, now check f10, f11 for debugging or f5 for refresh , it will work , no need to do fn+f5.
To unlock the Function keys again, hold down the Fn key and hit fnlock/Esc together.
The answer to your question would be in link below. You need to disable fn in bios.
http://windowssecrets.com/forums/showthread.php/134495-Cant-use-my-F-keys-without-pressing-fn
It worked for DELLL lattitude 5410 :
use fn key + escape key to toggle on/off function key lock.

Resources