How do I input the "Control" key in Love? as in love.keyboard.isDown("ctrl")

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
ocmike
Prole
Posts: 1
Joined: Fri Mar 05, 2021 6:40 am

How do I input the "Control" key in Love? as in love.keyboard.isDown("ctrl")

Post by ocmike »

How do I input the "Control" key in Love (e.g. love.keyboard.isDown("ctrl")?

I've tested with "ctrl" but it is not that, and I've Google and searched in these forums, but can not find it.

I'm trying to use it as such in the code below:

if love.keyboard.isDown("f") and love.keyboard.isDown("ctrl") then
player.x = player.x + 1
end

Thank you.
borr
Prole
Posts: 42
Joined: Wed Oct 16, 2019 7:39 pm

Re: How do I input the "Control" key in Love? as in love.keyboard.isDown("ctrl")

Post by borr »

https://love2d.org/wiki/KeyConstant

at bottom:
rctrl Right control key
lctrl Left control key
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Majestic-12 [Bot] and 6 guests