I want to be able to use a barcode scanner to enter data in a dialogue box in Google Sheets. The barcode scanner inserts "enter" after the numbers. How can I make the enter trigger the data entry (without clicking OK)?

//This should put the user input into A6
function promptA(prompt){
var ui = SpreadsheetApp.getUi();
  var ask =  SpreadsheetApp.getUi().prompt("May I know your name to check you in?  Prompt 1 Script")
var response = ask.getResponseText();
  setValue('A6', response);   

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.