PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[KBM] Map to custom keys / diacritic character, not just keycode

Open framctr opened this issue 5 years ago • 68 comments

I would like to use Keyboard Manager to map some shortcuts to keys that currently are accessible only from the "Windows Character Map" application. Specifically I would like to map AltGr + ' to ` and AltGr + ì to ~. I know that the Keyboard Manager enables only to map to keyboard keys, but allowing also custom characters would be such a great feature for a programmer.

framctr avatar Oct 02 '20 12:10 framctr

To add on this, there's a FOSS project under the name of "WinCompose" that's available at github.
https://github.com/samhocevar/wincompose

frenchiveruti avatar Jan 10 '21 05:01 frenchiveruti

Second this. I am using Japanese layout on my laptop built-in keyboard (US layout). As the underscore key is mission, I want to map Shift + 0 (which is empty in Japanese layout) to _ (Which normally is Shift + \). However, the attempt to add it to the shortcut is buggy and not function in most time, and as soon as I disconnected my USB Japanese keyboard, Shift + 0 will stop working, which makes the remapping useless.

ghost avatar Jan 11 '21 02:01 ghost

To add on this, there's a FOSS project under the name of "WinCompose" that's available at github. https://github.com/samhocevar/wincompose

Good thing, but I would prefer a solution from Microsoft. From my point of view, this is a so basic feature that it should be included in Windows yet. Just my opinion, but all collegues I met agree.

PS. For now I used the Microsoft Keyboard Layout Creator. It would be better to have a single layout than two similar one to the other except for 2 keys....

framctr avatar Jan 12 '21 09:01 framctr

To add on this, there's a FOSS project under the name of "WinCompose" that's available at github. https://github.com/samhocevar/wincompose

Good thing, but I would prefer a solution from Microsoft. From my point of view, this is a so basic feature that it should be included in Windows yet. Just my opinion, but all collegues I met agree.

PS. For now I used the Microsoft Keyboard Layout Creator. It would be better to have a single layout than two similar one to the other except for 2 keys....

Yes, what I meant with my comment is what they could implement in their software that already exists and it's useful.

frenchiveruti avatar Jan 12 '21 13:01 frenchiveruti

@crutkas this issue has come up several times and there is a lot of feedback from the community, should we included in the stability release or right after it?

enricogior avatar Jan 12 '21 13:01 enricogior

Apparently this important modification is not yet confirmed for any of the next 4 releases. Hopefully this will be remedied ASAP.

My own pressing need is to be able to remap to ANY Unicode character.

Can Unicode characters be mapped to unused Virtual Keys (VK nnn)?

AssemblerAce avatar Jan 16 '21 09:01 AssemblerAce

Lets target right after stability. I'll update the wiki.

crutkas avatar Jan 19 '21 19:01 crutkas

@enricogior this is for support of chords then as well based on some of the closed issues, correct? ala Ctrl-K, Ctrl-C inside VS to comment something. we closed a few issues it looks like against this for chords

crutkas avatar Jan 19 '21 20:01 crutkas

You can use microsoft keyboard layout creator to temporary bypass this problem, however I'd prefer to have this implemented in powertoys, because it's so much faster to implement a shortcut than having to import a keybord layout and set it in language preferences..

Ares9323 avatar Jan 21 '21 13:01 Ares9323

I'd just as soon see the MKLC reworked and brought back up to modern design. It was incredibly powerful, supporting dead keys, and there are characters I would need to type that I could only get that way, short of memorizing alt-codes or just searching for the specific character somewhere. Really, MKLC was a life-saver.

Please consider making the custom keys request an opportunity to improve the user experience around custom keyboards.

deoradh avatar Mar 13 '21 11:03 deoradh

Looking forward to see this feature in power toys. Is there an ETA for it?

pythonincloud avatar Mar 28 '21 18:03 pythonincloud

What is the ETA for PowerToys to get this annoying error fixed?

tierling avatar Apr 29 '21 04:04 tierling

Is it possible to type a diacritic and then follow it up with another character after as you can on Mac?

Essentially this allows you to use one key to type the accent and then use that accent for any compatible unicode character. It may already be possible with wincompose but i'm not sure.

Edit: it seems to be possible using wincompose but unlike Mac the typed diacritic isn't shown, and it blocks all shortcuts using the compose key.

zbot473 avatar May 13 '21 21:05 zbot473

Hi Mihir,

Not sure what you are referring to here, as I don't have a Mac but a Windows computer.

How can I remap the missing key with PowerToys?

Thanks,

Eric


From: Mihir Patil @.> Sent: Thursday, May 13, 2021 2:36 PM To: microsoft/PowerToys @.> Cc: Eric Tierling @.>; Comment @.> Subject: Re: [microsoft/PowerToys] [KBM] Map to custom keys / diacritic character, not just keycode (#6976)

Is it possible to type a diacritic and then follow it up with another character after as you can on mac?

Essentially this allows you to use one key to type the accent and then use that accent for any compatible unicode character. It may already be possible with wincompose but i'm not sure.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FPowerToys%2Fissues%2F6976%23issuecomment-840849448&data=04%7C01%7Ceric.tierling%40microsoft.com%7C1466d44c8f6140b0b54808d916573662%7C72f988bf86f141af91ab2d7cd011db47%7C0%7C0%7C637565386192845220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=49QVK%2BvcIBTyrdgQTITtbFHUcpJf2Pl%2BxdKKfevGFi0%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHPJEXL6FDPOBNDLKZPXEKDTNRA67ANCNFSM4SBU452A&data=04%7C01%7Ceric.tierling%40microsoft.com%7C1466d44c8f6140b0b54808d916573662%7C72f988bf86f141af91ab2d7cd011db47%7C0%7C0%7C637565386192845220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PFpfCQpaFySbuj6lAEjc1pp0c2j3Mh6kdN0nOC4DBaQ%3D&reserved=0.

tierling avatar May 13 '21 21:05 tierling

Is it possible to type a diacritic and then follow it up with another character after as you can on Mac?

Essentially this allows you to use one key to type the accent and then use that accent for any compatible unicode character. It may already be possible with wincompose but i'm not sure.

Edit: it seems to be possible using wincompose but unlike Mac the typed diacritic isn't shown, and it blocks all shortcuts using the compose key.

I believe what you're referring to is a dead key (e.g. you press ` + a, you get à). PowerToys doesn't support this, at least for now, which is why I made my own script, but I'm not sure what you mean by "the typed diacritic isn't shown", as I've never owned a Mac.

berzi avatar May 14 '21 06:05 berzi

Thank you. As stated, I don't know about Mac - this is for a Windows device. What you refer to a French special characters, but this is for English ones.

When I enable the German keyboard layout on an US keyboard hardware, both characters "<" and ">" are gone, as is the pipe char "|".

You need all of them for CUI / scripting / programming type of stuff.

What is rather weird with PowerToys is that you can assign "<", but not ">" .

  • THAT is the bug I reported.
  • Note: These chars are NOT custom keys. So you might adjust the incorrect bug title you picked.

When will that bug finally get fixed? It's open for a long time now.

Regards,

Eric

tierling avatar May 14 '21 17:05 tierling

The highlighted diacritic is what i'm focusing on. Other apps do the same but instead of highlighting, there's an underline.

The additional popup menus for multiple variations after pressing and holding a key is another feature that exists on Mac but is likely outside the scope of this issue but is still worth mentioning. https://user-images.githubusercontent.com/49821700/119588318-8e9bf500-bd9e-11eb-9234-ffaf18346ed8.mov

zbot473 avatar May 26 '21 01:05 zbot473

@zbot473 think you're asking more for #2668

crutkas avatar May 26 '21 03:05 crutkas

In addition to that i was suggesting it tells you the diacritic that's about to be inserted

zbot473 avatar May 26 '21 03:05 zbot473

(off-topic tip) A digital programmable keyboard - where every key is a miniature display - would be a solution for every developer. Have a look at https://www.youtube.com/watch?v=UvG_rTTmvmg (he shows many more very special keyboards) or https://www.artlebedev.com/optimus/popularis/

Jay-o-Way avatar Aug 30 '21 12:08 Jay-o-Way

A digital programmable keyboard - where every key is a miniature display - would be a solution for every developer. Have a look at https://www.youtube.com/watch?v=UvG_rTTmvmg (he shows many more very special keyboards) or https://www.artlebedev.com/optimus/popularis/

I think that is out-of-scope.

framctr avatar Sep 10 '21 08:09 framctr

I think that is out-of-scope.

It's wasn't a suggestion for software, but an off-topic tip for people who really need high performance keyboards. Not me. Just saying.

Jay-o-Way avatar Sep 10 '21 08:09 Jay-o-Way

@jay-o-way, i'd suggest a streamdeck or something along those lines if that is what you want.

crutkas avatar Sep 10 '21 19:09 crutkas

Hi all,

Just to add to the issue: remapping to any unicode character would be a great addition imo. Especially for PCs without a numpad this would be extremely helpful!

cheers

zauberervonOZ avatar Dec 11 '21 02:12 zauberervonOZ

Hey, I'm a bit late into this but the way I got around this is, I added both the US and UK keyboard on windows language settings. then just press the Windows key + spacebar to change between both quicky and press shift + 3

I'm on WIndows 11, don't know if this works on Windows 10 keyboards

PercyDavy avatar Feb 05 '22 01:02 PercyDavy

Yeah but what if you want to type accents on a US keyboard that has none? I don't really want to learn another layout to use accents

zbot473 avatar Feb 05 '22 20:02 zbot473

To add on this, there's a FOSS project under the name of "WinCompose" that's available at github. https://github.com/samhocevar/wincompose

The Wincompose program is incredibly useful, and to have available a standard Compose-Key in Windows/Powertoys with Unix/Linux abbreviations would be enormously useful for those of us who regularly use different languages and need to enter words containing e.g. æ ö ç É in the same text rapidly. Would also be super-useful for those who need to use a lot of emojis in their texts. Microsoft could even leverage their hardware-position to also push a compose key onto their MS-branded keyboards.

zmbdr avatar Feb 16 '22 09:02 zmbdr

Yeah but what if you want to type accents on a US keyboard that has none? I don't really want to learn another layout to use accents

This is where a Compose-Key is useful: To write é, you hit the compose-key, and then e '. Other obvious shortcuts:

  • Compose ae = æ
  • Compose o" = ö
  • Compose << = «

Really wish this was included as a standard in Windows, but the https://github.com/samhocevar/wincompose implements this well.

zmbdr avatar Feb 16 '22 09:02 zmbdr

I’d put wincompose closer to power accent tracking item vs this but wow that sounds neat. @samhocevar neat stuff looking at the readme.

crutkas avatar Feb 17 '22 07:02 crutkas

I beleive that this would be a great enhancement to all users that do not have a US keyboard. Key remapping is fine, but not powerful. I have an italian one, and there is no way for digiting quickly ~ (tilde) or ` (backtick) in Windows as opposed to Linux. In linux, by default there are very simple keyboard shortcuts. So I ended up in using AutoHotKey in the background with this rule configured: https://gist.githubusercontent.com/scollovati/3b4a6b44176797ff727f5c261c6b4975/raw/002c0321b7b1693b97cd5794b1cb8e3f33c212ef/layout.ahk

Hope that PowerToys will be able to tackle this functionality very soon.

scollovati avatar Feb 22 '22 11:02 scollovati