Author Topic: japanese modifier keys used in US layout recognizable as modifiers?  (Read 4013 times)

0 Members and 1 Guest are viewing this topic.

Offline ionflux

  • Thread Starter
  • Posts: 14
Hi all!
I ordered a second-hand topre 108UDK a couple of days ago , and I was wondering whether there is a way to map the hiragana/KANA etc keys to be modifier keys. I *know* they can be recognized by windows because they issue scan codes, but the question is could I make the system recognize them as alternative, custom modifiers? I don't want to just remap them to ctrl, shift, alt through autohotkey. I want to create a new modifier, e.g. "cmd", that can later on be recognized as such by windows software requesting me to input a new shortcut for a command.
e.g. in foobar2000, or inkscape.
I would press this new "cmd"+P and I would get just this.

Thanks in advance!
« Last Edit: Thu, 08 May 2014, 05:27:27 by ionflux »

Offline Blaskkaffe

  • Posts: 21
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #1 on: Wed, 07 May 2014, 07:55:48 »
it should probably be possible to do it in autohotkey, just map the scancode + a button to whaterver you want it to do

for example:

SC138 & Down::Send {Volume_Down}

would make pressing he key left to the spacebar and the down arrow att the same time to lower the volume

The script below lowers the volume of the app spotify, i personally use this but i use the menu key instead.

SC138 & Down::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Down}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}

What it does is send the command CTRL + DOWN (wich is lower volume in spotify) to the app even if it is minimized or not the main window (even while in a full screen game)

« Last Edit: Wed, 07 May 2014, 08:00:47 by Blaskkaffe »

Offline ionflux

  • Thread Starter
  • Posts: 14
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #2 on: Wed, 07 May 2014, 08:08:37 »
this was actually a revelation because of the spotify hotkey, I had this problem for ages, and never thought I could send a command without having to have the spotify window active (without issuing a postmessage thingy, which is a bit complicated for me)
so thanks for that!!  :thumb:

concerning the SC138 & key combo, I know this works, but the problem is you are actually sending other, existing keys. I wanted SC138 to become available for windows, so that I can insert this combination from with a dialog of some software (e.g. directory opus), but from what i m reading this doesn't seem to be possible, at least for the US layout. I might consider changing to a JP layout and see if I can make use of the japanese special modifiers. Has anyone tried this?

Offline Blaskkaffe

  • Posts: 21
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #3 on: Wed, 07 May 2014, 08:41:44 »
you can make it send custom keycodes that dont exist as a key on the keyboard, and then add those so that the program recognizes them or just send it in combination of a letter or caracter that does not normally exist on the keyboard, for example ♪ or ☺.

---------------------------------------------------------------------------------------------------------------------
{ASC nnnnn}   
Sends an ALT+nnnnn keypad combination, which can be used to generate special characters that don't exist on the keyboard. To generate ASCII characters, specify a number between 1 and 255. To generate ANSI characters (standard in most languages), specify a number between 128 and 255, but precede it with a leading zero, e.g. {Asc 0133}.

To generate Unicode characters, specify a number between 256 and 65535 (without a leading zero). However, this is not supported by all applications. Therefore, for greater compatibility and easier sending of long Unicode strings, use "Transform Unicode".
------------------------------------------------------------------------------------------------------------------
{vkXX}
{scYYY}
{vkXXscYYY}

Sends a keystroke that has virtual key XX and scan code YYY. For example: Send {vkFFsc159}. If the sc or vk portion is omitted, the most appropriate value is sent in its place.

The values for XX and YYY are hexadecimal and can usually be determined from the main window's View->Key history menu item. See also: Special Keys
-----------------------------------------------------------------------------------------------------------------------------
Autohotkey has lots of information on their website. :)

http://www.autohotkey.com/

Offline ionflux

  • Thread Starter
  • Posts: 14
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #4 on: Wed, 07 May 2014, 10:05:25 »
this sounds amazing, but I can't make it work. No characters show up in either of my editors, although they do if I do the usual ALT+0xxx
I tried, e.g.,
Code: [Select]
AppsKey & q::sendInput, {ASC899} hoping to get a "â".

But it still doesn't answer what I m asking (i think!)
What I need is to go to e.g. foobar, and where it says "Go to next track" in the preferences window, and has a box waiting for me to input a shortcut, to be able to press e.g. KANA+L
You dont' manually write K A N A + L, you press the combination and it registers it.
You cannot copy paste a character in there (nor in most programs that I use)

Offline islisis

  • Posts: 120
  • Location: Tokyo, Japan
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #5 on: Wed, 07 May 2014, 10:27:43 »
you may have left out a leading 0, but not all programs are likely to recognising every ansi character

unfortunately, windows has zero support for extra modifiers like hyper, and even if it did few programs would support it.

i suggest being a bit creative with your shortcut settings. one example: ctrl+alt+shift is not often mapped in programs due to its complexity. win+alt etc even more rarely.

you can bind a hotkey directly to a specific shortcut etc ctrl+alt+shift+y. or, you can bind a key to the modifier chord itself:

*sc07b::sendinput {blind}{ctrl down}{alt down}{shift down}
*sc07b up::sendinput {blind}{ctrl up}{alt up}{shift up}

Offline islisis

  • Posts: 120
  • Location: Tokyo, Japan
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #6 on: Wed, 07 May 2014, 11:00:17 »
just on another note: like other members here, i think that japanese keyboards are great way to gain thumb modifiers. i recommend considering: right/left thumb shift, right thumb enter
i also like to move win and use it for my main layer modifer, including win+space for backspace, esdf/ijkl for cursor etc. easy to chord with caps->ctrl
« Last Edit: Wed, 07 May 2014, 21:31:40 by islisis »

Offline ionflux

  • Thread Starter
  • Posts: 14
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #7 on: Wed, 07 May 2014, 11:42:48 »
you may have left out a leading 0, but not all programs are likely to recognising every ansi character
I tried all possible combinations, and all examples from Blaskkaffe's insightful post, but none worked in the context of an ahk  hotkey.
Quote

i suggest being a bit creative with your shortcut settings. one example: ctrl+alt+shift is not often mapped in programs due to its complexity. win+alt etc even more rarely.
But this is why i'm writing this post. I'm running out of free slots  :eek:
I have an enormous amount of hotkeys used, and autohotkey is starting to become a bit disfunctional. Some things do not always work, or some things break, and I needed a clean <modifier> slate.  :'(
OK, take this with a grain of salt, obviously I don't use a million hotkeys, but at some point the slots get more difficult to remember. If I use win+alt+ 4 different keys for various functionalities, then i m more hesitant to use win+alt+XXX again, because I'm afraid I'll overwrite a previous hotkey.
Quote
you can bind a hotkey directly to a specific shortcut etc ctrl+alt+shift+y. or, you can bind a key to the modifier chord itself:

*sc07b::sendinput {blind}{ctrl down}{alt down}{shift down}
*sc07b up::sendinput {blind}{ctrl up}{alt up}{shift up}
That last one I wasn't aware of, I'll make use of it! thanks!

Offline ionflux

  • Thread Starter
  • Posts: 14
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #8 on: Wed, 07 May 2014, 11:48:05 »
just on another note: like other members here, i think that japanese keyboards are great way to gain thumb modifiers. i recommend considering: right/left thumb shift, right thumb enter
i also like to move win and use it for my main layer modifer, including win+space for backspace, esdf/ijkl for cursor etc
This is why I got the japanese version, to use the extra keys as thumb modifiers, just not the usual ones :)
I'm tempted to try remapping shift next to space, though. I had read about ergodox and TEK, and liked the idea. For now I have remapped
  • the parentheses to LShift Down LShift Up and RShift[...] respectively (i got that from this forum if i m not mistaken, although,again, it doesn't work 100% of the time and this is frustrating)
  • underscore to -=
  • plus to =-
so that I don't have to use RShift so often. LShift I don't mind.

Offline Blaskkaffe

  • Posts: 21
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #9 on: Wed, 07 May 2014, 14:45:45 »
i think that the ASC tag is only for ascii symbols (1-255)

Offline islisis

  • Posts: 120
  • Location: Tokyo, Japan
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #10 on: Wed, 07 May 2014, 21:43:13 »
OK, take this with a grain of salt, obviously I don't use a million hotkeys, but at some point the slots get more difficult to remember. If I use win+alt+ 4 different keys for various functionalities, then i m more hesitant to use win+alt+XXX again, because I'm afraid I'll overwrite a previous hotkey.
if it wasn't clear, i didn't mean use those shortcuts physically (since they are complex and uncomfortable) but only as a proxy for your modifier key  ;)

in the end though you still need some way to remember them. i consider this the true art of remapping...

Offline ionflux

  • Thread Starter
  • Posts: 14
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #11 on: Thu, 08 May 2014, 01:47:48 »
nope, it was clear. :) It's just that I'm greedy and want *more* *separate* modifiers  :p
btw, why is it that the kana key is in the virtual codes list (and thus can be indeed used as a modifier) and the hiragana/katakana keys are not?

Offline Blaskkaffe

  • Posts: 21
Re: japanese modifier keys used in US layout RECOGNIZABLE as modifiers?
« Reply #12 on: Thu, 08 May 2014, 03:50:12 »
I think it might be since it dont send a release signal, like the Han/eng key on korean boards.

It just switches between the two modes

it should probably be some way of remapping it too tho

Offline islisis

  • Posts: 120
  • Location: Tokyo, Japan
Re: japanese modifier keys used in US layout recognizable as modifiers?
« Reply #13 on: Fri, 09 May 2014, 10:54:10 »
ok, well if you're going to be mapping per application in ahk then you already have a text file which you can assign to a shortcut and search when you need to remember :)

i don't remember using ahk to remap those keys myself, but you can always use keytweak/registry to remap them