Adds a heatmap about how often a key was pressed on keyboard from ggkeyboard

visualize_keyboard(
  keys,
  ggkeyboard = ggkeyboard::tkl,
  palette = ggkeyboard::keyboard_palette("magic"),
  layout = c("ansi", "iso"),
  font_family = "mono",
  font_size = 3,
  adjust_text_colour = TRUE,
  measurements = ggkeyboard::keyboard_measurements("default"),
  colour = "#e5e1e1",
  size = 1,
  ...
)

Arguments

keys

A data.frame with data tracked by track_keyboard

ggkeyboard

An input keyboard from ggkeyboard.

palette

Colour palette. Defaults to keyboard_palette("pastel"). To use a custom palette, create a vector with the names described in keyboard_palette.

layout

Keyboard layout - one of "ansi" or "iso". Defaults to "ansi".

font_family

Font used. Defaults to "Palatino". See the extrafont package for using fonts in ggplot2.

font_size

Base font size. Defaults to 3.

adjust_text_colour

Whether to lighten the text colour on dark keys. Defaults to TRUE.

measurements

Measurements of various aspects of the keyboard key height and width, gaps between keys and rows, etc. See keyboard_measurements.

colour

Highlight outline colour.

size

Highlight outline signs.

...

Additional options, passed to geom_rect.

Examples

visualize_keyboard(key_df, ggkeyboard = ggkeyboard::mac)