Media key confused with ASCII character











up vote
0
down vote

favorite












My new laptop has a set of media keys to control brightness, volume, play/pause, etc.



I've got most of these working in Ubuntu 18.10 (+ i3wm), except for one. On F4 is a "presentation mode" key, which I was hoping to bind to something useful. Strangely, pressing this key just prints the lowercase letter "p".



Indeed, xev returns very similar results for both keys:



The media key returns



KeyPress event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42090837, (682,799), root:(1645,825),
state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42090905, (682,799), root:(1645,825),
state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


while p returns



KeyPress event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42207819, (-91,844), root:(872,870),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42207867, (-91,844), root:(872,870),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


Meanwhile, the other media keys return a completely different output format, e.g.:



KeymapNotify event, serial 28, synthetic NO, window 0x0,
keys: 4294967184 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


xmodmap, of course, gives keycode 33 as



keycode  33 = p P p P thorn THORN thorn


How can I ensure the two keys are recognised as distinct?



Edit: Fn + the media key works as F4, as expected. Shift + the media key does nothing — in particular, it doesn't print a capital "P".










share|improve this question




















  • 1




    This is possibly a duplicate of askubuntu.com/questions/434403/…, but that's marked as resolved with no actual answer provided.
    – georgewatson
    Nov 28 at 16:03















up vote
0
down vote

favorite












My new laptop has a set of media keys to control brightness, volume, play/pause, etc.



I've got most of these working in Ubuntu 18.10 (+ i3wm), except for one. On F4 is a "presentation mode" key, which I was hoping to bind to something useful. Strangely, pressing this key just prints the lowercase letter "p".



Indeed, xev returns very similar results for both keys:



The media key returns



KeyPress event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42090837, (682,799), root:(1645,825),
state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42090905, (682,799), root:(1645,825),
state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


while p returns



KeyPress event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42207819, (-91,844), root:(872,870),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42207867, (-91,844), root:(872,870),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


Meanwhile, the other media keys return a completely different output format, e.g.:



KeymapNotify event, serial 28, synthetic NO, window 0x0,
keys: 4294967184 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


xmodmap, of course, gives keycode 33 as



keycode  33 = p P p P thorn THORN thorn


How can I ensure the two keys are recognised as distinct?



Edit: Fn + the media key works as F4, as expected. Shift + the media key does nothing — in particular, it doesn't print a capital "P".










share|improve this question




















  • 1




    This is possibly a duplicate of askubuntu.com/questions/434403/…, but that's marked as resolved with no actual answer provided.
    – georgewatson
    Nov 28 at 16:03













up vote
0
down vote

favorite









up vote
0
down vote

favorite











My new laptop has a set of media keys to control brightness, volume, play/pause, etc.



I've got most of these working in Ubuntu 18.10 (+ i3wm), except for one. On F4 is a "presentation mode" key, which I was hoping to bind to something useful. Strangely, pressing this key just prints the lowercase letter "p".



Indeed, xev returns very similar results for both keys:



The media key returns



KeyPress event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42090837, (682,799), root:(1645,825),
state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42090905, (682,799), root:(1645,825),
state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


while p returns



KeyPress event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42207819, (-91,844), root:(872,870),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42207867, (-91,844), root:(872,870),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


Meanwhile, the other media keys return a completely different output format, e.g.:



KeymapNotify event, serial 28, synthetic NO, window 0x0,
keys: 4294967184 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


xmodmap, of course, gives keycode 33 as



keycode  33 = p P p P thorn THORN thorn


How can I ensure the two keys are recognised as distinct?



Edit: Fn + the media key works as F4, as expected. Shift + the media key does nothing — in particular, it doesn't print a capital "P".










share|improve this question















My new laptop has a set of media keys to control brightness, volume, play/pause, etc.



I've got most of these working in Ubuntu 18.10 (+ i3wm), except for one. On F4 is a "presentation mode" key, which I was hoping to bind to something useful. Strangely, pressing this key just prints the lowercase letter "p".



Indeed, xev returns very similar results for both keys:



The media key returns



KeyPress event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42090837, (682,799), root:(1645,825),
state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42090905, (682,799), root:(1645,825),
state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


while p returns



KeyPress event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42207819, (-91,844), root:(872,870),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
root 0x167, subw 0x0, time 42207867, (-91,844), root:(872,870),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


Meanwhile, the other media keys return a completely different output format, e.g.:



KeymapNotify event, serial 28, synthetic NO, window 0x0,
keys: 4294967184 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


xmodmap, of course, gives keycode 33 as



keycode  33 = p P p P thorn THORN thorn


How can I ensure the two keys are recognised as distinct?



Edit: Fn + the media key works as F4, as expected. Shift + the media key does nothing — in particular, it doesn't print a capital "P".







keyboard 18.10 media-buttons






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 29 at 7:37

























asked Nov 28 at 14:52









georgewatson

1013




1013








  • 1




    This is possibly a duplicate of askubuntu.com/questions/434403/…, but that's marked as resolved with no actual answer provided.
    – georgewatson
    Nov 28 at 16:03














  • 1




    This is possibly a duplicate of askubuntu.com/questions/434403/…, but that's marked as resolved with no actual answer provided.
    – georgewatson
    Nov 28 at 16:03








1




1




This is possibly a duplicate of askubuntu.com/questions/434403/…, but that's marked as resolved with no actual answer provided.
– georgewatson
Nov 28 at 16:03




This is possibly a duplicate of askubuntu.com/questions/434403/…, but that's marked as resolved with no actual answer provided.
– georgewatson
Nov 28 at 16:03















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096829%2fmedia-key-confused-with-ascii-character%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096829%2fmedia-key-confused-with-ascii-character%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?