Skip to content

Instantly share code, notes, and snippets.

@quackingduck
Created December 27, 2020 01:12
Show Gist options
  • Save quackingduck/29d97d831b860cffa104f5bc9c30ed92 to your computer and use it in GitHub Desktop.
Save quackingduck/29d97d831b860cffa104f5bc9c30ed92 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'left space key behavior',
initial: 'booting',
context: {layer: null, timer: null},
states: {
'booting': {
on: { 'boot': 'listening' }
},
'listening': {
states: {
'qwerty layer on': {
states: {
'space key not pressed': {
on: {
'press space key': 'space key pressed'
}
}
},
'space key pressed': {}
}
}
},
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment