Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small suggestion: Key controls for sandspiel #248

Open
EdHerrera123 opened this issue Dec 29, 2022 · 5 comments
Open

Small suggestion: Key controls for sandspiel #248

EdHerrera123 opened this issue Dec 29, 2022 · 5 comments

Comments

@EdHerrera123
Copy link

EdHerrera123 commented Dec 29, 2022

ii

  • Key 1-5: Change size brush

Update:

Selecting elements

  • A: Mouse Scroll: Select elements that is at behind/front of the selected elements. If scrolling while not selecting elements
    (Wind to Rocket), Selects wind. When selected element back to wind or next to rocket will make a loop.
  • B: Wasd/Arrow keys: Select elements that is next to selected element by pressing right arrow or D, etc...
@labbo-lab
Copy link
Contributor

heres a script for this that you can paste into chrome's console

document.addEventListener('keydown', function(event) {
  if(event.key === '1') {
    document.querySelector("#ui > .sizes > button:nth-child(1)").click();
  }
});

document.addEventListener('keydown', function(event) {
  if(event.key === '2') {
    document.querySelector("#ui > .sizes > button:nth-child(2)").click();
  }
});

document.addEventListener('keydown', function(event) {
  if(event.key === '3') {
    document.querySelector("#ui > .sizes > button:nth-child(3)").click();
  }
});

document.addEventListener('keydown', function(event) {
  if(event.key === '4') {
    document.querySelector("#ui > .sizes > button:nth-child(4)").click();
  }
});

document.addEventListener('keydown', function(event) {
  if(event.key === '5') {
    document.querySelector("#ui > .sizes > button:nth-child(5)").click();
  }
});

@EdHerrera123
Copy link
Author

thx

@labbo-lab
Copy link
Contributor

thx

https://pastebin.com/xtL5TW55 heres an updated script that checks to see if a menu is open before doing the action

@EdHerrera123
Copy link
Author

Was thinking about key shortcuts for selecting elements and have two alt ideas:

  • A: Mouse Scroll: Select elements that is at behind/front of the selected elements. If scrolling while not selecting elements
    (Wind to Rocket), Selects wind. When selected element back to wind or next to rocket will make a loop.
  • B: Wasd/Arrow keys: Select elements that is next to selected element by pressing right arrow or D, etc...

@labbo-lab
Copy link
Contributor

labbo-lab commented Jan 9, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants