A small tool to view real-world ActivityPub objects as JSON! Enter a URL
or username from Mastodon or a similar service below, and we'll send a
request with
the right
Accept
header
to the server to view the underlying object.
{
"@context": [
"https://join-lemmy.org/context.json",
"https://www.w3.org/ns/activitystreams"
],
"type": "Page",
"id": "https://lemmy.ml/post/6282659",
"attributedTo": "https://lemmy.ml/u/Dirk",
"to": [
"https://lemmy.world/c/hyprland",
"https://www.w3.org/ns/activitystreams#Public"
],
"name": "[Rant] Why is there no sane way to remap keys?",
"cc": [],
"content": "<p>shared from: <a href=\"https://lemmy.ml/post/6282553\">lemmy.ml/post/6282553</a></p>\n<p>There is now an update: <a href=\"https://lemmy.ml/comment/6913362#comment-6913362\">lemmy.ml/comment/6913362#comment-6913362</a></p>\n<p>The rant is obsolete now :)</p>\n<blockquote>\n<p>I recently switched to Hyprland on my laptop and was able to set it up as I like, but I struggle hard to set up keybinds to simply print different characters when pressing certain key combinations.</p>\n<p>For example, one small snippet from my <code>.Xmodmap</code> (there are more in this file but that’s enough for a minimal working example)</p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">keycode 108 = Mode_switch\n</span><span style=\"color:#323232;\">keycode 38 = a A adiaeresis Adiaeresis\n</span></pre>\n<p>This allows me to press the A key in combination with the right Alt key to print an <code>ä</code> or an <code>Ä</code> when shift is pressed, to.</p>\n<h3>wtype and built-in key binding</h3>\n<p>After some research I found <a href=\"https://github.com/atx/wtype\" rel=\"nofollow\">wtype</a> which allows me to write arbitrary text when called with the parameters.</p>\n<p>After I learned that Hyprland (or Wayland) does not distinguish between Alt_R and Alt_L (they’re shown as <code>Alt_R</code> and <code>Alt_L</code> in <a href=\"https://git.sr.ht/~sircmpwn/wev\" rel=\"nofollow\">wev</a> with different keysyms, so they’re clearly two different keys) and I accepted it, I just found out that this tool only works when being in a terminal emulator and not in a GUI application so this tool is useless for me.</p>\n<h3>keyd</h3>\n<p>Then I tried <a href=\"https://github.com/rvaiya/keyd\" rel=\"nofollow\">keyd</a>. After setting it up and adding my user to the needed groups and starting the service and trying to figure out how to actually define keymaps I was able to send something when pressing a defined key combination.</p>\n<p>But: Nothing else than ASCII.</p>\n<p>The dev thinks it’s a Chromium problem based on <a href=\"https://github.com/rvaiya/keyd/issues/470\" rel=\"nofollow\">this issue</a> but it actually isn’t. I wasn’t able to send an <code>ä</code> to ANY application, no matter if GUI or terminal or <a href=\"https://qutebrowser.org\" rel=\"nofollow\">Qutebrowser</a>.</p>\n<p>Since there is basically no online resources or user community for this tool, I cannot find any usable information on this issue except the unrelated Chrome reference and thus I removed it again because I cannot use it for what I want to use it for.</p>\n<h3>xkb</h3>\n<p>For whatever reason Wayland (or Hyprland) uses certain parts of the <a href=\"https://en.wikipedia.org/wiki/X_keyboard_extension\" rel=\"nofollow\">X keyboard extension</a>, so I also tried this one.</p>\n<p>Despite being absurdly complex and annoying to setup I was able to configure a user based keyboard variant using user-based symbols. From what I’ve taken <a href=\"https://askubuntu.com/questions/1187610/reassigning-modifier-keys-with-xkb\" rel=\"nofollow\">from</a> <a href=\"https://unix.stackexchange.com/questions/572768/remapping-a-key-for-xkb\" rel=\"nofollow\">various</a> <a href=\"https://blog.debiania.in.ua/posts/2021-06-10-remapping-keys-under-wayland.html\" rel=\"nofollow\">sites</a> my config should do nothing more than remapping <code>Alt_R</code> to <code>ISO_Layer3_Shift</code> just for testing purposes.</p>\n<p>But all I achieved was reproducibly crashing Hyprland when setting it up to actually use said keyboard variant and there seems to be no log file.</p>\n<h3>yeah, that’s where we are</h3>\n<p>Again, it’s not about the umlauts, and not about the German keyboard layout, and not about switching lkayouts on-the-fly, it’s just to demonstrate what I mean. You can replace ä with any other character you want.</p>\n<p>After a long night of trying out to have the Xmodmap functionality in Wayland using Hyprland as compositor I ended up with not being successful.</p>\n<p>I give up for now.</p>\n<p>Maybe one day there will be an actually working solution requiring nothing more than two lines in a file.</p>\n</blockquote>\n",
"mediaType": "text/html",
"source": {
"content": "shared from: https://lemmy.ml/post/6282553\n\nThere is now an update: https://lemmy.ml/comment/6913362#comment-6913362\n\nThe rant is obsolete now :)\n\n> I recently switched to Hyprland on my laptop and was able to set it up as I like, but I struggle hard to set up keybinds to simply print different characters when pressing certain key combinations.\n> \n> For example, one small snippet from my `.Xmodmap` (there are more in this file but that’s enough for a minimal working example)\n> \n> ```\n> keycode 108 = Mode_switch\n> keycode 38 = a A adiaeresis Adiaeresis\n> ```\n> \n> This allows me to press the A key in combination with the right Alt key to print an `ä` or an `Ä` when shift is pressed, to.\n> \n> ### wtype and built-in key binding\n> \n> After some research I found [wtype][wtype] which allows me to write arbitrary text when called with the parameters.\n> \n> After I learned that Hyprland (or Wayland) does not distinguish between Alt_R and Alt_L (they’re shown as `Alt_R` and `Alt_L` in [wev][wev] with different keysyms, so they’re clearly two different keys) and I accepted it, I just found out that this tool only works when being in a terminal emulator and not in a GUI application so this tool is useless for me.\n> \n> ### keyd\n> \n> Then I tried [keyd][keyd]. After setting it up and adding my user to the needed groups and starting the service and trying to figure out how to actually define keymaps I was able to send something when pressing a defined key combination.\n> \n> But: Nothing else than ASCII.\n> \n> The dev thinks it’s a Chromium problem based on [this issue][issue] but it actually isn’t. I wasn’t able to send an `ä` to ANY application, no matter if GUI or terminal or [Qutebrowser][qb].\n> \n> Since there is basically no online resources or user community for this tool, I cannot find any usable information on this issue except the unrelated Chrome reference and thus I removed it again because I cannot use it for what I want to use it for.\n> \n> ### xkb\n> \n> For whatever reason Wayland (or Hyprland) uses certain parts of the [X keyboard extension][xkb], so I also tried this one.\n> \n> Despite being absurdly complex and annoying to setup I was able to configure a user based keyboard variant using user-based symbols. From what I’ve taken [from][from] [various][various] [sites][sites] my config should do nothing more than remapping `Alt_R` to `ISO_Layer3_Shift` just for testing purposes.\n> \n> But all I achieved was reproducibly crashing Hyprland when setting it up to actually use said keyboard variant and there seems to be no log file.\n> \n> ### yeah, that’s where we are\n> \n> Again, it’s not about the umlauts, and not about the German keyboard layout, and not about switching lkayouts on-the-fly, it’s just to demonstrate what I mean. You can replace ä with any other character you want.\n> \n> After a long night of trying out to have the Xmodmap functionality in Wayland using Hyprland as compositor I ended up with not being successful.\n> \n> I give up for now.\n> \n> Maybe one day there will be an actually working solution requiring nothing more than two lines in a file.\n> \n> [wtype]: https://github.com/atx/wtype\n> [wev]: https://git.sr.ht/~sircmpwn/wev\n> [keyd]: https://github.com/rvaiya/keyd\n> [issue]: https://github.com/rvaiya/keyd/issues/470\n> [qb]: https://qutebrowser.org\n> [xkb]: https://en.wikipedia.org/wiki/X_keyboard_extension\n> \n> [from]: https://askubuntu.com/questions/1187610/reassigning-modifier-keys-with-xkb\n> [various]: https://unix.stackexchange.com/questions/572768/remapping-a-key-for-xkb\n> [sites]: https://blog.debiania.in.ua/posts/2021-06-10-remapping-keys-under-wayland.html",
"mediaType": "text/markdown"
},
"attachment": [],
"sensitive": false,
"published": "2023-10-10T10:21:31.911879Z",
"updated": "2023-12-27T23:55:34.295377Z",
"language": {
"identifier": "en",
"name": "English"
},
"audience": "https://lemmy.world/c/hyprland",
"tag": [
{
"href": "https://lemmy.ml/post/6282659",
"name": "#hyprland",
"type": "Hashtag"
}
]
}