File tree 1 file changed +9
-5
lines changed
app/src/main/java/io/github/sds100/keymapper/mappings/keymaps 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -267,21 +267,25 @@ class KeyMapListItemCreator(
267
267
}
268
268
}
269
269
270
- if (deviceName != null || key.detectionSource == KeyEventDetectionSource .INPUT_METHOD || ! key.consumeEvent) {
271
- append(" (" )
270
+ val parts = mutableListOf<String >()
272
271
272
+ if (deviceName != null || key.detectionSource == KeyEventDetectionSource .INPUT_METHOD || ! key.consumeEvent) {
273
273
if (key.detectionSource == KeyEventDetectionSource .INPUT_METHOD ) {
274
- append( " ${ getString(R .string.flag_detect_from_input_method)} $midDot " )
274
+ parts.add( getString(R .string.flag_detect_from_input_method))
275
275
}
276
276
277
277
if (deviceName != null ) {
278
- append (deviceName)
278
+ parts.add (deviceName)
279
279
}
280
280
281
281
if (! key.consumeEvent) {
282
- append( " $midDot ${ getString(R .string.flag_dont_override_default_action)} " )
282
+ parts.add( getString(R .string.flag_dont_override_default_action))
283
283
}
284
+ }
284
285
286
+ if (parts.isNotEmpty()) {
287
+ append(" (" )
288
+ append(parts.joinToString(separator = " $midDot " ))
285
289
append(" )" )
286
290
}
287
291
}
You can’t perform that action at this time.
0 commit comments