停止运行闪亮的应用程序键盘快捷键

Har*_*son 5 r rstudio shiny

我正在从R Studio运行一个应用程序。Linux中停止运行闪亮应用程序的键盘快捷键是什么?例如,启动应用程序的快捷方式是Ctr ShiftK。我看了但没有找到停止应用程序的捷径。有一个红色的停止标志图标,可使用鼠标将其停止。

某处必须有键盘快捷键。

这是我的YAML

---
title: "HR Analytics"
runtime: shiny
output: html_notebook
---
Run Code Online (Sandbox Code Playgroud)

Flo*_*ian 2

您也可以自己为其创建一个活动。当用户按下ESC(27) 时,这将停止应用程序。

library(shiny)
runApp( list(ui = bootstrapPage(
  verbatimTextOutput("results"),
  tags$script('
              $(document).on("keyup", function (e) {
              Shiny.onInputChange("keypressed", e.which);
              });
              '),
  p('This is a demo app')
  )
  , server = function(input, output, session) {

observeEvent(input$keypressed,
             {
               if(input$keypressed==27)
                 stopApp()
             })
  }
))
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助!