Caleb Porzio 5 年之前
父节点
当前提交
ad9422d0b4
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      README.md

+ 8 - 0
README.md

@@ -190,6 +190,14 @@ Most common boolean attributes are supported, like `readonly`, `required`, etc.
 
 If any data is modified in the expression, other element attributes "bound" to this data, will be updated.
 
+**`keydown` modifiers**
+
+**Example:** `<input type="text" x-on:keydown.escape="open = false">`
+
+You can specify specific keys to listen for using keydown modifiers appended to the `x-on:keydown` directive. Note that the modifiers are kebab-cased versions of `Event.key` values.
+
+Examples: `enter`, `escape`, `arrow-up`, `arrow-down`
+
 **`.away` modifier**
 
 **Example:** `<div x-on:click.away="showModal = false"></div>`