Mercurial > vim
annotate src/osdef2.h.in @ 34219:a0a4a774117b v9.1.0058
patch 9.1.0058: Cannot map Super Keys in GTK UI
Commit: https://github.com/vim/vim/commit/92e90a1e102825aa9149262cacfc991264db05df
Author: Casey Tucker <dctucker@hotmail.com>
Date: Thu Jan 25 22:44:00 2024 +0100
patch 9.1.0058: Cannot map Super Keys in GTK UI
Problem: Cannot map Super Keys in GTK UI
(Casey Tucker)
Solution: Enable Super Key mappings in GTK using <D-Key>
(Casey Tucker)
As a developer who works in both Mac and Linux using the same keyboard,
it can be frustrating having to remember different key combinations or
having to rely on system utilities to remap keys.
This change allows `<D-z>` `<D-x>` `<D-c>` `<D-v>` etc. to be recognized
by the `map` commands, along with the `<D-S-...>` shifted variants.
```vimrc
if has('gui_gtk')
nnoremap <D-z> u
nnoremap <D-S-Z> <C-r>
vnoremap <D-x> "+d
vnoremap <D-c> "+y
cnoremap <D-v> <C-R>+
inoremap <D-v> <C-o>"+gP
nnoremap <D-v> "+P
vnoremap <D-v> "-d"+P
nnoremap <D-s> :w<CR>
inoremap <D-s> <C-o>:w<CR>
nnoremap <D-w> :q<CR>
nnoremap <D-q> :qa<CR>
nnoremap <D-t> :tabe<CR>
nnoremap <D-S-T> :vs#<CR><C-w>T
nnoremap <D-a> ggVG
vnoremap <D-a> <ESC>ggVG
inoremap <D-a> <ESC>ggVG
nnoremap <D-f> /
nnoremap <D-g> n
nnoremap <D-S-G> N
vnoremap <D-x> "+x
endif
```
closes: #12698
Signed-off-by: Casey Tucker <dctucker@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 25 Jan 2024 23:00:03 +0100 |
parents | 9f3fd7937957 |
children |
rev | line source |
---|---|
7 | 1 /* |
2 * osdef2.h.in - See osdef1.h.in for a description. | |
3 */ | |
4 | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
5 extern int remove(const char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
6 extern int rename(const char *, const char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
7 extern int free(char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
8 extern char *malloc(unsigned int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
9 extern char *realloc(char *, int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
10 extern char *getenv(char *); |
13264
9f3fd7937957
patch 8.0.1506: new version of HP NonStop (Tandem) doesn't like a header
Christian Brabandt <cb@256bit.org>
parents:
7722
diff
changeset
|
11 #ifndef __TANDEM |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
12 extern int setenv(char *, char *, int); |
13264
9f3fd7937957
patch 8.0.1506: new version of HP NonStop (Tandem) doesn't like a header
Christian Brabandt <cb@256bit.org>
parents:
7722
diff
changeset
|
13 #else |
9f3fd7937957
patch 8.0.1506: new version of HP NonStop (Tandem) doesn't like a header
Christian Brabandt <cb@256bit.org>
parents:
7722
diff
changeset
|
14 extern int setenv(const char *, const char *, int); |
9f3fd7937957
patch 8.0.1506: new version of HP NonStop (Tandem) doesn't like a header
Christian Brabandt <cb@256bit.org>
parents:
7722
diff
changeset
|
15 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
16 extern int putenv(const char *); |
7 | 17 |
1076 | 18 #ifndef __TANDEM |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
19 extern int gethostname(char *, int); |
1076 | 20 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
21 extern void perror(char *); |
7 | 22 |
1076 | 23 #ifndef __TANDEM |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
24 extern int sleep(int); |
1076 | 25 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
26 extern int usleep(unsigned int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
27 extern unsigned int alarm(unsigned int); |
1076 | 28 #ifndef __TANDEM |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
29 extern int chdir(char *); |
1076 | 30 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
31 extern int fchdir(int); |
7 | 32 #ifndef stat /* could be redefined to stat64() */ |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
33 extern int stat(const char *, struct stat *); |
7 | 34 #endif |
35 #ifndef lstat /* could be redefined to lstat64() */ | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
36 extern int lstat(const char *, struct stat *); |
7 | 37 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
38 extern int fstat(int, struct stat *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
39 extern int open(const char *, int, ...); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
40 extern int close(int); |
1076 | 41 #ifndef __TANDEM |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
42 extern int read(int, char *, size_t); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
43 extern int write(int, char *, size_t); |
1076 | 44 #endif |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
45 extern int pipe(int *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
46 extern off_t lseek(int, off_t, int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
47 extern void sync(void); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
48 extern uid_t getuid(void); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
49 extern gid_t getgid(void); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
50 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); |
7 | 51 |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
52 extern int isatty(int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
53 extern int getpid(void); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
54 extern int dup(int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
55 extern int unlink(const char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
56 extern int link(const char *, const char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
57 extern int mkdir(const char *, mode_t); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
58 extern int rmdir(const char *); |
7 | 59 |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
60 extern int tgetent(char *, char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
61 extern int tgetnum(char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
62 extern int tgetflag(char *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
63 extern char *tgoto(char *, int, int); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
64 extern int tputs(char *, int, int (*)(int)); |
7 | 65 |
66 #ifdef HAVE_TERMIOS_H | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
67 struct termios; /* for tcgetattr() */ |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
68 extern int tcgetattr(int, struct termios *); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
69 extern int tcsetattr(int, int, const struct termios *); |
7 | 70 #endif |
71 | |
72 #ifdef HAVE_SYS_STATFS_H | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
73 struct statfs; /* for fstatfs() */ |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
74 extern int fstatfs(int, struct statfs *, int, int); |
7 | 75 #endif |
76 | |
77 #ifdef HAVE_GETTIMEOFDAY | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
78 struct timeval; /* for gettimeofday() */ |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
79 struct timezone; /* for gettimeofday() */ |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
80 extern int gettimeofday(struct timeval *tp, struct timezone *tzp); |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
81 extern time_t time(time_t *); |
7 | 82 #endif |
83 | |
84 #ifdef HAVE_GETPWNAM | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
85 struct passwd; /* for getpwnam() */ |
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
86 extern struct passwd *getpwnam(const char *); |
7 | 87 #endif |
88 | |
89 #ifdef USE_TMPNAM | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
90 extern char *tmpnam(char *); |
7 | 91 #else |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
92 extern char *mktemp(char *); |
7 | 93 #endif |
94 | |
95 #ifdef ISC | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
96 extern int _Xmblen(char const *, size_t); |
7 | 97 #else |
98 /* This is different from the header but matches mblen() */ | |
7722
c4f8b1d48f20
commit https://github.com/vim/vim/commit/e240c2da796531e807ea9df78bdbcc7b1012870c
Christian Brabandt <cb@256bit.org>
parents:
1076
diff
changeset
|
99 extern int _Xmblen(char *, size_t); |
7 | 100 #endif |