diff --git a/packages/main/src/FileUploader.hbs b/packages/main/src/FileUploader.hbs
index d9185e7f5d1e..2c953771ae1b 100644
--- a/packages/main/src/FileUploader.hbs
+++ b/packages/main/src/FileUploader.hbs
@@ -4,6 +4,8 @@
@mouseout="{{_onmouseout}}"
@focusin="{{_onfocusin}}"
@focusout="{{_onfocusout}}"
+ @keydown="{{_onkeydown}}"
+ @keyup="{{_onkeyup}}"
>
{{#unless hideInput}}
diff --git a/packages/main/src/FileUploader.js b/packages/main/src/FileUploader.js
index aaa6d0edbb9b..40985df124ad 100644
--- a/packages/main/src/FileUploader.js
+++ b/packages/main/src/FileUploader.js
@@ -6,6 +6,7 @@ import {
fetchI18nBundle,
getI18nBundle,
} from "@ui5/webcomponents-base/dist/i18nBundle.js";
+import { isEnter, isSpace } from "@ui5/webcomponents-base/dist/Keys.js";
import {
FILEUPLOAD_BROWSE,
FILEUPLOADER_TITLE,
@@ -284,6 +285,18 @@ class FileUploader extends UI5Element {
});
}
+ _onkeydown(event) {
+ if (isEnter(event)) {
+ this._input.click(event);
+ }
+ }
+
+ _onkeyup(event) {
+ if (isSpace(event)) {
+ this._input.click(event);
+ }
+ }
+
_onfocusin() {
this.focused = true;
}