If the keyboard is locked, try holding the right shift key for 8 seconds to lock and unlock the keyboard.

 Also, if the computer in "tablet" mode, there is a setting to switch 2-in-1 computers in Windows 10 setting 

HP Notebook PCs - How to Lock or Unlock the Fn (Function) Key

Try the following:

Use Shift + Fn (actually  Fn + Shift, button-down-order seems to matter here) on HP EliteBook or ProBook to invert/swap Fn and F-Keys (aka "lock Fn"). The keyboard indicates the current mode with a little light on the Fn key and also shows the switching option printed on the Shift-Key, see screenshots attached. Sometimes it's worth checking the printings on the keyboards before using google though - learned the hard way.

This document is for HP EliteBook or ProBook x360 notebook computers.

Keyboard function keys (f1 through f12) often have a printed icon that indicates a secondary action, such as muting sound or adjusting display brightness. The secondary functionality is sometimes called action keys mode or hotkeys. On some keyboards, press the fn key to enable that command.

The location of the fn key might vary slightly.

1. Function keys (f1 through f12)

2. fn key

Select the Advanced menu in the Basic Input/Output System (BIOS). Select the Device Configuration menu. Press the right or left arrow key to select Enable or Disable the Fn Key switch. Press the f10 key to save the setting and restart the computer.

Many notebooks feature a setting that allows you to use the action keys functionality without pressing the fn key each time. Use the correct steps based on your notebook type to enable or disable this functionality.