0

I am trying to set up an App Script add on for Google Sheets.

What I am hoping to do is allow the user to be in Google Sheets (with the focus on the current cell or selection of cells). Whenever the user hits "alt", it would either allow a prompt or dialog box to open up with text input. The user can then enter a short String, which would be a command that would get executed in Appscript based on what the command is. (akin to Excel hot keys).

Is there a way to do this in App Script today?

I have tried several links below but struggling to figure out how to do this.

I would ideally not have the user have to use the mouse for anything if possible (e.g., clicking on a dialog box).

Link 1 Link 2

srachoor
  • 15
  • 1
  • 5
  • 2
    I don't think so. You'll will have to call a function with either a menu or a button – Cooper Oct 25 '21 at 16:20
  • 1
    https://stackoverflow.com/questions/13731589/how-to-create-custom-keyboard-shortcuts-for-google-app-script-functions – Kos Oct 25 '21 at 16:33
  • @Kos -- thanks for sharing. That was one of the links I had posted about. It wasn't clear to me from those posts that I can do what I posted above, hence I posted my question. – srachoor Oct 25 '21 at 19:19
  • 1
    Yeah no, so that post doesn't answer your question? – Kos Oct 25 '21 at 19:36
  • No, I believe not. I believe it links to some code that requires the creation of a dialog or sidebar that needs to be clicked on. – srachoor Oct 25 '21 at 20:07
  • 1
    But you missed top rated answer there, I think it is pretty correct – Kos Oct 25 '21 at 20:58
  • 1
    There's macros(https://stackoverflow.com/a/49946187/), but not one button click -but ctrl+alt+ – TheMaster Oct 25 '21 at 21:33
  • @Kos -- not sure I understand what you mean. I looked all over that post and nothing was helpful with respect to my specific request. Are you saying the post is pretty correct or what I wrote is correct? – srachoor Oct 25 '21 at 21:55
  • @TheMaster -- I don't want to use a macro as they are not distributable in a Sheets Add On. – srachoor Oct 25 '21 at 21:56
  • 1
    @srachoor If you've reviewed such answers, you should've explained why each answer is unsatisfactory - in your question itself. So that we don't have to waste time suggesting solutions that you already were aware of and of which you think it won't work. – TheMaster Oct 25 '21 at 22:13

0 Answers0