Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

github.com/tducasse/ebiten-input

Package Overview
Dependencies
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/tducasse/ebiten-input

Source
Go Modules
Version
v0.0.0-20220322101350-a1d9a0b27bbb
Version published
Created
Source

ebiten-input

Map keys to actions in ebiten

Usage

import input "github.com/tducasse/ebiten-input"

keys := map[string][]ebiten.Key{
    "up":    {ebiten.KeyArrowUp, ebiten.KeyW},
    "down":  {ebiten.KeyArrowDown, ebiten.KeyS},
    "right": {ebiten.KeyArrowRight, ebiten.KeyD},
    "left":  {ebiten.KeyArrowLeft, ebiten.KeyA},
  }
input.Init(keys)

// add actions later with
input.AddAction("action", []ebiten.Key{ebiten.KeySpace})

// check the status with 
if input.IsPressed("up") {
  // do something here
}

FAQs

Package last updated on 22 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts