games50 / pong

Atari's 1972 classic, implemented in Lua with LÖVE
835 stars 1.13k forks source link

Support keypad in Linux #71

Open tkzv opened 3 years ago

tkzv commented 3 years ago

The example does not work with keypad arrows and Enter in Linux. Could you add support for them? This requires changing 3 conditions in main.lua:

In function love.update replace love.keyboard.isDown('up') with love.keyboard.isDown('up') or love.keyboard.isDown('kp8') love.keyboard.isDown('down') with love.keyboard.isDown('down') or love.keyboard.isDown('kp2')

In function love.keypressed replace key == 'enter' or key == 'return' with key == 'enter' or key == 'return' or key == 'kpenter'