Fork me on GitHub

K E Y .pics
Quick, Simple, Consistent, Scalable Key & Button Icons

Keyboard Keys

Key Preview
Key preview
  • Also supports FontAwesome Icons by prefixing the Label with far:/fas:/fab: (e.g. far:smile)
  • License for selected font available here

Mouse Buttons

Mouse Preview
Mouse preview

  • Also supports FontAwesome Icons by prefixing the Label with far:/fas:/fab: (e.g. far:smile)
  • License for selected font available here

Usage

Key.pics provides a simple way to create Keyboard and Mouse icons, originally intended for visualizing inputs of games and other software to their users.

For example:
ctrl+C to copy the selected text
ctrl+V to paste the copied text
double click to open the file

Script Tag


<script src="https://unpkg.com/key.pics/dist/key.pics.min.js"></script>
                        

NPM


npm install --save key.pics
                        

HTML


<i class="keypics" data-mode="link" data-color="blue">K</i><!-- mode=link replaces the element with an <img> tag -->
<i class="keypics" data-mode="fetch" data-color="green">E</i><!-- mode=fetch downloads the SVG data and inserts it directly in the page -->
<i class="keypics" data-mode="link">Y</i>

<i class="keypics" data-type="mouse" data-label="x2">right</i>
                        
Give it a go on CodePen!