# `GSGlyph setPreviousKerningGroupID:forDirection:`

*Instance Method*

Sets the prefixed kerning key on the side facing the preceding glyph for a writing direction.

## Declaration

```swift
func setPreviousKerningGroupID(_ groupId: String, for direction: GSWritingDirection)
```

```objc
- (void) setPreviousKerningGroupID:(NSString *) groupId forDirection:(GSWritingDirection) direction;
```

```python
setPreviousKerningGroupID_forDirection_(groupId: str, direction: GSWritingDirection)
```

## Parameters

- `groupId` — The prefixed kerning key.
- `direction` — The writing direction used to determine the preceding side.

## See Also

### Kerning Groups

- [`GSGlyph.leftKerningGroup`](/Core/GlyphsCore/GSGlyph/leftKerningGroup) — Kerning group for pairs on the left side.
- [`GSGlyph.rightKerningGroup`](/Core/GlyphsCore/GSGlyph/rightKerningGroup) — Kerning group for pairs on the right side.
- [`GSGlyph.topKerningGroup`](/Core/GlyphsCore/GSGlyph/topKerningGroup) — Kerning group for pairs on the top side.
- [`GSGlyph.bottomKerningGroup`](/Core/GlyphsCore/GSGlyph/bottomKerningGroup) — Kerning group for pairs on the bottom side.
- [`GSGlyph.leftKerningGroupId`](/Core/GlyphsCore/GSGlyph/leftKerningGroupId) — Prefixed kerning key corresponding to [`GSGlyph.leftKerningGroup`](/Core/GlyphsCore/GSGlyph/leftKerningGroup).
- [`GSGlyph.rightKerningGroupId`](/Core/GlyphsCore/GSGlyph/rightKerningGroupId) — Prefixed kerning key corresponding to [`GSGlyph.rightKerningGroup`](/Core/GlyphsCore/GSGlyph/rightKerningGroup).
- [`GSGlyph.topKerningGroupId`](/Core/GlyphsCore/GSGlyph/topKerningGroupId) — Prefixed kerning key corresponding to [`GSGlyph.topKerningGroup`](/Core/GlyphsCore/GSGlyph/topKerningGroup).
- [`GSGlyph.bottomKerningGroupId`](/Core/GlyphsCore/GSGlyph/bottomKerningGroupId) — Prefixed kerning key corresponding to [`GSGlyph.bottomKerningGroup`](/Core/GlyphsCore/GSGlyph/bottomKerningGroup).
- [`GSGlyph previousKerningGroupForDirection:`](/Core/GlyphsCore/GSGlyph/previousKerningGroupForDirection:) — Kerning group on the side facing the preceding glyph for a writing direction.
- [`GSGlyph setPreviousKerningGroup:forDirection:`](/Core/GlyphsCore/GSGlyph/setPreviousKerningGroup:forDirection:) — Sets the kerning group on the side facing the preceding glyph for a writing direction.
- [`GSGlyph previousKerningGroupIDforDirection:`](/Core/GlyphsCore/GSGlyph/previousKerningGroupIDforDirection:) — Prefixed kerning key on the side facing the preceding glyph for a writing direction.
- [`GSGlyph nextKerningGroupForDirection:`](/Core/GlyphsCore/GSGlyph/nextKerningGroupForDirection:) — Kerning group on the side facing the following glyph for a writing direction.
- [`GSGlyph setNextKerningGroup:forDirection:`](/Core/GlyphsCore/GSGlyph/setNextKerningGroup:forDirection:) — Sets the kerning group on the side facing the following glyph for a writing direction.
- [`GSGlyph nextKerningGroupIDforDirection:`](/Core/GlyphsCore/GSGlyph/nextKerningGroupIDforDirection:) — Prefixed kerning key on the side facing the following glyph for a writing direction.
- [`GSGlyph setNextKerningGroupID:forDirection:`](/Core/GlyphsCore/GSGlyph/setNextKerningGroupID:forDirection:) — Sets the prefixed kerning key on the side facing the following glyph for a writing direction.

