Can't detect home/end KeyConstants

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
CaptainMaelstrom
Party member
Posts: 161
Joined: Sat Jan 05, 2013 10:38 pm

Can't detect home/end KeyConstants

Post by CaptainMaelstrom »

My laptop doesn't have a discrete home or end key. Instead, I have to enable Num Lock and then press keypad 7 or keypad 1 respectively to send home/end keypresses to applicaitons.

All the applications I use regularly seem to detect home/end just find when I have num lock enabled. However, I can't figure out how to detect them in LOVE2D. Even when num lock is enabled, LOVE2D only sees my keypresses as "kp7" and "kp1" KeyConstants. Is this a bug, or am I missing something?
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: Can't detect home/end KeyConstants

Post by pgimeno »

Sounds normal to me. In a regular keyboard, you can also press Home and End by disabling NumLock and pressing the keypad 1 and 7 keys, so that's business as usual. If your laptop doesn't have these, then you have no way to press them.

Are you sure it's not available through a "Fn" key combined with some other key?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Can't detect home/end KeyConstants

Post by raidho36 »

What you need is a keybinding functionality in your game.
Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests