Replace non-alphanumerics with _ in VirtualKeyMap

We currently rewrite device name for finding the matching .idc, .kl,
.kcm files, but we aren't allowing this for virtual key maps.

Rewrite the name for virtual devices to provide some flexibility in
matching for the right files in sys/board_properties.

Bug: 113575658
Test: atest libinput_tests inputflinger_tests
Change-Id: I54d159e9ecf02327cae388ae14c0bcf21c415e6e
diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp
index 4735643..4da1473 100644
--- a/services/inputflinger/EventHub.cpp
+++ b/services/inputflinger/EventHub.cpp
@@ -1617,7 +1617,7 @@
     // The virtual key map is supplied by the kernel as a system board property file.
     std::string path;
     path += "/sys/board_properties/virtualkeys.";
-    path += device->identifier.name;
+    path += device->identifier.getCanonicalName();
     if (access(path.c_str(), R_OK)) {
         return false;
     }