Choose style:

Author Topic: Make Caps Lock perform something else  (Read 1326 times)

0 Members and 1 Guest are viewing this topic.

Offline Fritz74

  • Member
  • ***
  • Posts: 103
  • Karma: 11
  • m, 45, Austria
    • View Profile
  • Peppermint version(s): 10
Make Caps Lock perform something else
« on: October 23, 2017, 11:05:28 pm »
I bought a great and cheap Chinese laptop with a HiDPI screen. Unfortunately it is missing a key: The one for <, > and |
As I don't need Caps Lock, I want to use it to output those characters.
I found Keyboard Shortcuts in the Peppermint Control Center.
What is the shortcut for pressing Caps Lock? As said, I want pressing Caps Lock to output <.

If this is not possible with "Keyboard Shortcuts", is there another way?
« Last Edit: October 24, 2017, 09:33:43 am by Fritz74 »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25725
  • Karma: 2822
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Make Caps Lock perform something else
« Reply #1 on: October 24, 2017, 06:51:56 am »
This won't survive a reboot (yet), but if it works we can make it permanent.

Open a terminal and run:
Code: [Select]
xmodmap -e "keycode 66 = less"
does the "Caps_Lock" key now produce an "<" ?

If not REBOOT, and then we'll have to use "xev" to get the exact keycode for your Cap_Lock key.
« Last Edit: October 24, 2017, 06:53:57 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Fritz74

  • Member
  • ***
  • Posts: 103
  • Karma: 11
  • m, 45, Austria
    • View Profile
  • Peppermint version(s): 10
Re: Make Caps Lock perform something else
« Reply #2 on: October 24, 2017, 08:10:20 am »
Hello!

Now Caps_Lock produces an "<" but also still acts like Caps_Lock.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25725
  • Karma: 2822
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Make Caps Lock perform something else
« Reply #3 on: October 24, 2017, 08:47:04 am »
Try:
Code: [Select]
setxkbmap -option caps:none && xmodmap -e "keycode 66 = less"
?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Fritz74

  • Member
  • ***
  • Posts: 103
  • Karma: 11
  • m, 45, Austria
    • View Profile
  • Peppermint version(s): 10
Re: Make Caps Lock perform something else
« Reply #4 on: October 24, 2017, 09:05:12 am »
Perfect! :)

The output is <.

What is the command to make Caps_Lock + Shift print > ?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25725
  • Karma: 2822
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Make Caps Lock perform something else
« Reply #5 on: October 24, 2017, 09:14:21 am »
Okay what you want is probably:
Code: [Select]
setxkbmap -option caps:none && xmodmap -e "keycode 66 Shift = less greater"

which should set:-
Caps_Lock = OFF
then
Caps_Lock = <
Shift+Caps_Lock = >
« Last Edit: October 24, 2017, 09:17:19 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Fritz74

  • Member
  • ***
  • Posts: 103
  • Karma: 11
  • m, 45, Austria
    • View Profile
  • Peppermint version(s): 10
Re: Make Caps Lock perform something else
« Reply #6 on: October 24, 2017, 09:26:30 am »
It works, thanks a lot!!!!

And finally: How do I make Caps_Lock + Alt type | ?
« Last Edit: October 24, 2017, 09:29:18 am by Fritz74 »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25725
  • Karma: 2822
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Make Caps Lock perform something else
« Reply #7 on: October 24, 2017, 10:04:42 am »
You can't .. because you've now mapped Caps_Lock to < .. and Alt +< is already mapped.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Fritz74

  • Member
  • ***
  • Posts: 103
  • Karma: 11
  • m, 45, Austria
    • View Profile
  • Peppermint version(s): 10
Re: Make Caps Lock perform something else
« Reply #8 on: October 24, 2017, 10:08:56 am »
Well, you can't have everything. Thanks a lot!  :-*

(Editing html would be hard without < and >. )

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25725
  • Karma: 2822
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Make Caps Lock perform something else
« Reply #9 on: October 24, 2017, 10:29:39 am »
May not help much, but you can always type a "|" by holding Ctrl+Shift and whilst holding them type u7c then release the Ctrl+Shift.

< = Ctrl+Shift then u3c

> = Ctrl+Shift then u3e

😃😃😃
« Last Edit: October 24, 2017, 12:16:01 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline scifidude79

  • Global Moderator
  • Hero
  • *****
  • Posts: 4029
  • Karma: 863
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Make Caps Lock perform something else
« Reply #10 on: October 24, 2017, 10:54:13 am »
(Editing html would be hard without < and >. )

That's for sure.  It would be a nightmare.  :(