|
Hello again techies
Just got a new HP Pavilion dv7 notebook, and the F5 key is literally a blank key. Like, it has no icon on it or anything, and it does not work without the Fn key. I have already gone to the Bios and set it so my f1-f12 work without Fn, and all of them do EXCEPT F5, for whatever strange reason. This is really, really annoying.
Any idea how to fix this?
|
|
Yep I've already done what is posted in that link.
And I have no idea how to do what you posted as a last resort, please explain =(
|
Try booting it in safe mode after you make sure the FN functions are still disabled.
|
On June 27 2012 09:20 Flonomenalz wrote:Yep I've already done what is posted in that link. And I have no idea how to do what you posted as a last resort, please explain =(
I guess you could try AutoHotKey: http://www.autohotkey.com/ It is capable of remapping keys: http://www.autohotkey.com/docs/misc/Remap.htm
Try using the AutoScriptWriter to see if it detects what key that button sends.
If AutoScriptWriter doesn't detect the key, you'd probably have to create a program that hooks the keyboard.
+ Show Spoiler +Here's some C# code... TL doesn't preserve indents + Show Spoiler + using System; using System.Collections.Generic; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Diagnostics;
namespace Capture { static class Program {
const int yourF5Key = 1234; // Replace 1234 with the actual value of the button /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); _hookID = SetHook(_proc); UnhookWindowsHookEx(_hookID); }
/****************************************/ private const int WH_KEYBOARD_LL = 13; //private const int WH_KEYBOARD_LL = 13; private const int WM_KEYDOWN = 0x0100; private const int VK_F1 = 0x70; private static LowLevelKeyboardProc _proc = HookCallback; private static IntPtr _hookID = IntPtr.Zero;
private static IntPtr SetHook(LowLevelKeyboardProc proc) { using (Process curProcess = Process.GetCurrentProcess()) using (ProcessModule curModule = curProcess.MainModule) { return SetWindowsHookEx(WH_KEYBOARD_LL, proc, GetModuleHandle(curModule.ModuleName), 0); } }
private delegate IntPtr LowLevelKeyboardProc( int nCode, IntPtr wParam, IntPtr lParam);
private static IntPtr HookCallback( int nCode, IntPtr wParam, IntPtr lParam) {
if (nCode >= 0) { Keys number = (Keys)Marshal.ReadInt32(lParam); // Stores the key pressed into the number variable if (number == (Keys)yourF5key){ // Check for your "F5" button SendKeys.Send("{F5}"); // Sends F5 } } return CallNextHookEx(IntPtr.Zero, nCode, wParam, lParam);
}
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool UnhookWindowsHookEx(IntPtr hhk);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr GetModuleHandle(string lpModuleName); } }
You'd have to find out the value of the number variable when you press your "F5" button (can be done in debugging mode in an IDE such as Visual Studio, just add a breakpoint after this and check for the value of number): + Show Spoiler +Keys number = (Keys)Marshal.ReadInt32(lParam); And then modify the conditional statement so that when that "F5" button's number is matched + Show Spoiler +if (number == yourF5keynumber) The program sends the F5 key. + Show Spoiler +
|
Yeah this is a popular thing with Dell laptops , you just have to go into the BIOS and change that F keys have priority over FN keys so that you have to press the FN button to use Functions ... silly isnt it ? xD
|
My absolute FAVORITE thing is when you try to help someone with their "tech" problem and they never reply.
|
Once your problems solved who cares anymore right ?
|
On June 29 2012 00:24 lSasquatchl wrote: My absolute FAVORITE thing is when you try to help someone with their "tech" problem and they never reply.
Second only to "never mind guys, I fixed it".
|
I work at a computer repair store and my favourite thing to hear is "It won't work" Okay so whats wrong with it? "i dunno it just doesnt work"
ಠ_ಠ
|
Actually, it's not that I stopped replying, it's that I had some stuff to take care of school wise, and the F5 problem kind of took the back seat in my mind in the midst of all the work I was doing, I apologize.
I'll already changed the settings in the Bios Plundr, I said that in the OP.
I have booted it in safe mode and it's disabled. Like I said, all my other F keys work without Fn after I changed the Bios EXCEPT for F5, it just does nothing.
Pseudoku thanks for the response, checking that out now, and wow you even wrote C# code for me ^.^ Unfortunately I've only learned Java up till now (just started learning Java's GUI after learning the basics of it) so I don't FULLY understand the C# code, but I get the gist of it. I'm going to learn from it though, thanks so much for that, quick question, is "using" in C# the same thing as "import" in Java?).
edit: Aha, I simply remapped the key using autohotkey, I will run that C# code though later tonight to find the issue with F5. Thank you all so much for your responses, and I especially thank you pseudoku
|
Yes, using is essentially import. C# is quite similar to Java.
Glad to hear that Autohotkey worked.
I actually just copied and pasted some code I already use for capturing Print Screen (since that button doesn't get picked up as a KeyEvent...) and modified it.
|
Ah i misread that, sorry bout that Flono!
|
|
|
|